summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/exceptions.py')
-rw-r--r--lib/sqlalchemy/exceptions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/exceptions.py b/lib/sqlalchemy/exceptions.py
index 6aeca3efc..c803a06c3 100644
--- a/lib/sqlalchemy/exceptions.py
+++ b/lib/sqlalchemy/exceptions.py
@@ -49,4 +49,6 @@ class AssertionError(SQLAlchemyError):
class DBAPIError(SQLAlchemyError):
"""something weird happened with a particular DBAPI version"""
- pass
+ def __init__(self, message, orig):
+ SQLAlchemyError.__init__(self, "(%s) (%s) %s"% (message, orig.__class__.__name__, str(orig)))
+ self.orig = orig