parent
2a33e32456
commit
44c8b26f10
@ -140,12 +140,13 @@ class ValidationError(Exception):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
class DbError(Exception):
|
class DbError(Exception):
|
||||||
"""Error used to report that the request window is already displayed."""
|
"""Error used to report BerkeleyDB errors"""
|
||||||
def __init__(self, value):
|
def __init__(self, value):
|
||||||
Exception.__init__(self)
|
Exception.__init__(self)
|
||||||
if isinstance(value, tuple):
|
try:
|
||||||
self.value = value[1]
|
(errnum, errmsg) = value
|
||||||
else:
|
self.value = errmsg
|
||||||
|
except:
|
||||||
self.value = value
|
self.value = value
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user