Exceptions¶
This page describes all the internal exceptions raised by this library.
Note that other exceptions such as ValidationError can also be raised
and these are not wrapped (yet?) by this library.
Exception hierarchy¶
aiostem.exceptions defines the following hierarchy of exceptions.
Naming things is hard, but a short description of every exception is provided below.
Base exception¶
Effective exception¶
- exception aiostem.exceptions.ControllerError[source]¶
Bases:
AiostemErrorRaised when the controller encountered an error.
This indicates that a fatal error has occurred, and the controller should be closed, no other action will be possible afterward.
It happens when the link to the controlled breaks, or when no compatible authentication method was found.
- exception aiostem.exceptions.CryptographyError[source]¶
Bases:
AiostemErrorAny error raised due to an invalid cryptography check.
This is typically raised while deciphering a descriptor or when an incorrect hash was computed during
AUTHCHALLENGE.
- exception aiostem.exceptions.ProtocolError[source]¶
Bases:
AiostemErrorRaised when a bad command, reply or event was encountered.
When raised without a sub-class, this hints to a serious issue with the core protocol itself. This could occur for example if Tor would mess with the protocol so bad that we could not known what to do next.
Otherwise it is the base exception for all more common errors (see below).
Protocol exceptions¶
- exception aiostem.exceptions.CommandError[source]¶
Bases:
ProtocolErrorAn error occurred while building a new command.
This is a typical outcome when an invalid argument or argument combination has been provided to a command (generally caught during serialization).
It can also hint to a possible command injection, when the provided data, once serialized contains line-feed characters that would break the core protocol.
No command was sent to Tor when this occurs.
- exception aiostem.exceptions.MessageError[source]¶
Bases:
ProtocolErrorRaised as a result of a bad manipulation of a received
Message.This error is currently only raised when a reply message gets incorrectly routed to the event processing part of the library.
As a user, you will never see this error.
- exception aiostem.exceptions.ReplyError[source]¶
Bases:
ProtocolErrorRaised when something went wrong with a reply or an event.
This is never raised without a subclass.