fpdb/pyfpdb/Exceptions.py
grindi dbaf4dbdbc Make msgs about parse errors more verbose
+ fix small bug in FpdbParseError
2009-11-07 22:01:30 +03:00

25 lines
563 B
Python

class FpdbError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
class FpdbParseError(FpdbError):
def __init__(self,value='',hid=''):
self.value = value
self.hid = hid
def __str__(self):
if self.hid:
return repr("HID:"+self.hid+", "+self.value)
else:
return repr(self.value)
class FpdbDatabaseError(FpdbError):
pass
class FpdbMySQLFailedError(FpdbDatabaseError):
pass
class DuplicateError(FpdbError):
pass