diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-12-08 18:08:40 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-12-27 10:33:22 -0500 |
commit | 064f82986ca3573b124fc88518e99d3d43874b61 (patch) | |
tree | e3d4fa7c0983c4a0b36b4b2af2ee9ce4e11c2789 /lib/sqlalchemy/sql/compiler.py | |
parent | 1abc8e5500f23e0cfdf4d125d354065dad28aa7a (diff) | |
download | sqlalchemy-064f82986ca3573b124fc88518e99d3d43874b61.tar.gz |
Implement an error lookup
Add codes to commonly raised error messages and classes
that link back to fixed documentation sections
giving background on these messages.
Change-Id: I78d0660add7026bb662e20305a59283b20616954
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 9ed75ca06..cb058affa 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -271,7 +271,7 @@ class Compiled(object): if e is None: raise exc.UnboundExecutionError( "This Compiled object is not bound to any Engine " - "or Connection.") + "or Connection.", code="2afi") return e._execute_compiled(self, multiparams, params) def scalar(self, *multiparams, **params): @@ -540,11 +540,11 @@ class SQLCompiler(Compiled): raise exc.InvalidRequestError( "A value is required for bind parameter %r, " "in parameter group %d" % - (bindparam.key, _group_number)) + (bindparam.key, _group_number), code="cd3x") else: raise exc.InvalidRequestError( "A value is required for bind parameter %r" - % bindparam.key) + % bindparam.key, code="cd3x") elif bindparam.callable: pd[name] = bindparam.effective_value @@ -559,11 +559,11 @@ class SQLCompiler(Compiled): raise exc.InvalidRequestError( "A value is required for bind parameter %r, " "in parameter group %d" % - (bindparam.key, _group_number)) + (bindparam.key, _group_number), code="cd3x") else: raise exc.InvalidRequestError( "A value is required for bind parameter %r" - % bindparam.key) + % bindparam.key, code="cd3x") if bindparam.callable: pd[self.bind_names[bindparam]] = bindparam.effective_value |