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-11-22 06:00:23 +01:00
|
|
|
class FpdbParseError(FpdbError):
|
2009-08-12 02:46:39 +02:00
|
|
|
def __init__(self,value='',hid=''):
|
|
|
|
self.value = value
|
2009-08-09 16:19:43 +02:00
|
|
|
self.hid = hid
|
2009-08-12 02:46:39 +02:00
|
|
|
def __str__(self):
|
2009-11-07 19:57:23 +01:00
|
|
|
if self.hid:
|
|
|
|
return repr("HID:"+self.hid+", "+self.value)
|
2009-08-12 02:46:39 +02:00
|
|
|
else:
|
|
|
|
return repr(self.value)
|
|
|
|
|
2009-09-04 13:49:46 +02:00
|
|
|
class FpdbDatabaseError(FpdbError):
|
|
|
|
pass
|
|
|
|
|
2009-11-22 06:00:23 +01:00
|
|
|
class FpdbMySQLError(FpdbDatabaseError):
|
2009-10-09 13:31:25 +02:00
|
|
|
pass
|
|
|
|
|
2009-11-22 06:00:23 +01:00
|
|
|
class FpdbMySQLAccessDenied(FpdbDatabaseError):
|
|
|
|
def __init__(self, value='', errmsg=''):
|
|
|
|
self.value = value
|
|
|
|
self.errmsg = errmsg
|
|
|
|
def __str__(self):
|
|
|
|
return repr(self.value +" " + self.errmsg)
|
|
|
|
|
2009-11-27 13:19:43 +01:00
|
|
|
class FpdbMySQLNoDatabase(FpdbDatabaseError):
|
|
|
|
def __init__(self, value='', errmsg=''):
|
|
|
|
self.value = value
|
|
|
|
self.errmsg = errmsg
|
|
|
|
def __str__(self):
|
|
|
|
return repr(self.value +" " + self.errmsg)
|
|
|
|
|
2009-08-28 08:43:12 +02:00
|
|
|
class DuplicateError(FpdbError):
|
2009-08-28 19:24:51 +02:00
|
|
|
pass
|