fpdb/pyfpdb/Exceptions.py

24 lines
556 B
Python
Raw Normal View History

2009-08-12 02:46:39 +02:00
class DuplicateError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
class FpdbError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
class FpdbParseError(Exception):
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)