summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/exc.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/exc.py')
-rw-r--r--lib/sqlalchemy/exc.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sqlalchemy/exc.py b/lib/sqlalchemy/exc.py
index 99214dfdd..c52924cfb 100644
--- a/lib/sqlalchemy/exc.py
+++ b/lib/sqlalchemy/exc.py
@@ -78,9 +78,18 @@ class NoReferenceError(InvalidRequestError):
class NoReferencedTableError(NoReferenceError):
"""Raised by ``ForeignKey`` when the referred ``Table`` cannot be located."""
+ def __init__(self, message, tname):
+ super(NoReferencedTableError, self).__init__(message)
+ self.table_name = tname
+
class NoReferencedColumnError(NoReferenceError):
"""Raised by ``ForeignKey`` when the referred ``Column`` cannot be located."""
+ def __init__(self, message, tname, cname):
+ super(NoReferencedColumnError, self).__init__(message)
+ self.table_name = tname
+ self.column_name = cname
+
class NoSuchTableError(InvalidRequestError):
"""Table does not exist or is not visible to a connection."""