Exceptions, Eric style (lost in merge)
This commit is contained in:
@@ -1,8 +1,3 @@
|
|||||||
class DuplicateError(Exception):
|
|
||||||
def __init__(self, value):
|
|
||||||
self.value = value
|
|
||||||
def __str__(self):
|
|
||||||
return repr(self.value)
|
|
||||||
|
|
||||||
class FpdbError(Exception):
|
class FpdbError(Exception):
|
||||||
def __init__(self, value):
|
def __init__(self, value):
|
||||||
@@ -10,7 +5,7 @@ class FpdbError(Exception):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return repr(self.value)
|
return repr(self.value)
|
||||||
|
|
||||||
class FpdbParseError(Exception):
|
class FpdbParseError(FpdbError):
|
||||||
def __init__(self,value='',hid=''):
|
def __init__(self,value='',hid=''):
|
||||||
self.value = value
|
self.value = value
|
||||||
self.hid = hid
|
self.hid = hid
|
||||||
@@ -20,4 +15,6 @@ class FpdbParseError(Exception):
|
|||||||
else:
|
else:
|
||||||
return repr(self.value)
|
return repr(self.value)
|
||||||
|
|
||||||
|
class DuplicateError(FpdbError):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user