errors.py

00001 #!/usr/bin/env python
00002 # -*- coding: utf-8 -*-
00003 
00004 # ----------------------------------------------------------------------------
00005 # pyjama - python jamendo audioplayer
00006 # Copyright (c) 2008 Daniel Nögel
00007 #
00008 # This program is free software: you can redistribute it and/or modify
00009 # it under the terms of the GNU General Public License as published by
00010 # the Free Software Foundation, either version 3 of the License, or
00011 # (at your option) any later version.
00012 #
00013 # This program is distributed in the hope that it will be useful,
00014 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 # GNU General Public License for more details.
00017 # You should have received a copy of the GNU General Public License
00018 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019 # ----------------------------------------------------------------------------
00020 
00021 ## @package errors
00022 # This module holds several exceptions that might
00023 # be raised by pyjama. 
00024 
00025 #
00026 # Jamendo Errors
00027 #
00028 ## From this Class any Jamendo exception derives
00029 class JamendoQueryException(Exception):
00030     pass
00031 
00032 ## This exception will be raised when the user
00033 # queries jamendo to frequently (1s limit)
00034 class ToFast(JamendoQueryException):
00035     pass
00036 
00037 ## This exception is raised when interaction with
00038 # jamendo failed for some reasion. Pyjama will 
00039 # popup an error dialog in those cases, too.
00040 class ConnectionError(JamendoQueryException):
00041     pass
00042 
00043 
00044 
00045 #
00046 # Database Errors
00047 #
00048 class DatabaseQueryException(Exception):
00049     def __init__(self):
00050         self.inst = None
00051         self.traceback = None
00052 
00053 
00054 ## This Exception will be raised when querying
00055 # the database failed. Pyjama will also popup
00056 # and error dialog with traceback infos.
00057 class QueryException(DatabaseQueryException):
00058     pass

Generated on Thu Jun 4 19:08:24 2009 for Pyjama by  doxygen 1.5.8