exc.py 660 B

123456789101112131415161718192021
  1. # ext/asyncio/exc.py
  2. # Copyright (C) 2020-2022 the SQLAlchemy authors and contributors
  3. # <see AUTHORS file>
  4. #
  5. # This module is part of SQLAlchemy and is released under
  6. # the MIT License: https://www.opensource.org/licenses/mit-license.php
  7. from ... import exc
  8. class AsyncMethodRequired(exc.InvalidRequestError):
  9. """an API can't be used because its result would not be
  10. compatible with async"""
  11. class AsyncContextNotStarted(exc.InvalidRequestError):
  12. """a startable context manager has not been started."""
  13. class AsyncContextAlreadyStarted(exc.InvalidRequestError):
  14. """a startable context manager is already started."""