summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/compiler.py
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2021-01-14 18:55:59 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2021-01-14 18:55:59 +0000
commit41ca37734aa4f293ac5fb63c239d78185c8ec983 (patch)
tree372f172e38ba565df1a6b3acb9c70c843eed3735 /lib/sqlalchemy/ext/compiler.py
parent4d20df14846e644b88fbe8a288116422bf5e343e (diff)
parentb4c6cfc2fde6c652e79ca157f8023a3f8941bc3c (diff)
downloadsqlalchemy-41ca37734aa4f293ac5fb63c239d78185c8ec983.tar.gz
Merge "Use UnsupportedCompilationError for no default compiler"
Diffstat (limited to 'lib/sqlalchemy/ext/compiler.py')
-rw-r--r--lib/sqlalchemy/ext/compiler.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/sqlalchemy/ext/compiler.py b/lib/sqlalchemy/ext/compiler.py
index 5a31173ec..47fb6720b 100644
--- a/lib/sqlalchemy/ext/compiler.py
+++ b/lib/sqlalchemy/ext/compiler.py
@@ -425,9 +425,11 @@ def compiles(class_, *specs):
return existing_dispatch(element, compiler, **kw)
except exc.UnsupportedCompilationError as uce:
util.raise_(
- exc.CompileError(
- "%s construct has no default "
- "compilation handler." % type(element)
+ exc.UnsupportedCompilationError(
+ compiler,
+ type(element),
+ message="%s construct has no default "
+ "compilation handler." % type(element),
),
from_=uce,
)
@@ -476,9 +478,11 @@ class _dispatcher(object):
fn = self.specs["default"]
except KeyError as ke:
util.raise_(
- exc.CompileError(
- "%s construct has no default "
- "compilation handler." % type(element)
+ exc.UnsupportedCompilationError(
+ compiler,
+ type(element),
+ message="%s construct has no default "
+ "compilation handler." % type(element),
),
replace_context=ke,
)