Skip to content
Back to top

# `gevent.exceptions` – Exceptions

Exceptions.

Added in version 1.3b1.

exception LoopExit

  Bases: `Exception`

  Exception thrown when the hub finishes running (`gevent.hub.Hub.run` would return).

  In a normal application, this is never thrown or caught explicitly. The internal implementation of functions like `gevent.hub.Hub.join()` and `gevent.joinall()` may catch it, but user code generally should not.

  Caution

  Errors in application programming can also lead to this exception being raised. Some examples include (but are not limited too):

  - greenlets deadlocking on a lock;

  - using a socket or other gevent object with native thread affinity from a different thread

  property hub

    The (optional) hub that raised the error.

    Added in version 20.12.0.