fpdb/pyfpdb/Exceptions.py

22 lines
496 B
Python
Raw Normal View History

2009-08-12 02:46:39 +02:00
class FpdbError(Exception):
2009-08-28 19:24:51 +02:00
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
2009-08-12 02:46:39 +02:00
2009-08-28 08:43:12 +02:00
class FpdbParseError(FpdbError):
2009-08-12 02:46:39 +02:00
def __init__(self,value='',hid=''):
self.value = value
self.hid = hid
2009-08-12 02:46:39 +02:00
def __str__(self):
if hid:
return repr("HID:"+hid+", "+self.value)
else:
return repr(self.value)
class FpdbDatabaseError(FpdbError):
pass
2009-08-28 08:43:12 +02:00
class DuplicateError(FpdbError):
2009-08-28 19:24:51 +02:00
pass