diff options
author | Federico Caselli <cfederico87@gmail.com> | 2021-01-12 22:00:59 +0100 |
---|---|---|
committer | Federico Caselli <cfederico87@gmail.com> | 2021-01-21 21:38:05 +0100 |
commit | bb846d1650423ce8013feb93b3c8837b4c5498a0 (patch) | |
tree | 2d07156f92af86df3db35d016f193d84f0082ec0 /lib/sqlalchemy/exc.py | |
parent | 851a3a362ee5e05b8438f92e2e1df63c68f79d68 (diff) | |
download | sqlalchemy-bb846d1650423ce8013feb93b3c8837b4c5498a0.tar.gz |
Improve error message when await_ call errors
Fixes: #5832
Change-Id: Ia2ed8f1d1ec54e5f6e1a8f817a69446fdb3b7f6d
Diffstat (limited to 'lib/sqlalchemy/exc.py')
-rw-r--r-- | lib/sqlalchemy/exc.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sqlalchemy/exc.py b/lib/sqlalchemy/exc.py index 08b1bb060..289b8dfab 100644 --- a/lib/sqlalchemy/exc.py +++ b/lib/sqlalchemy/exc.py @@ -294,6 +294,15 @@ class AwaitRequired(InvalidRequestError): code = "xd1r" +class MissingGreenlet(InvalidRequestError): + r"""Error raised by the async greenlet await\_ if called while not inside + the greenlet spawn context. + + """ + + code = "xd2s" + + class NoReferencedTableError(NoReferenceError): """Raised by ``ForeignKey`` when the referred ``Table`` cannot be located. |