fpdb/pyfpdb/Exceptions.py
2009-08-28 07:49:21 +01:00

21 lines
452 B
Python

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