Exceptions and Warnings


class qtrio.QTrioException[source]

Bases: Exception

Base exception for all QTrio exceptions.

class qtrio.NoOutcomesError[source]

Bases: QTrioException

Raised if you try to unwrap a qtrio.Outcomes which has no outcomes.

class qtrio.EventTypeRegistrationError[source]

Bases: QTrioException

Base class for various event type registration exceptions to inherit from.

class qtrio.EventTypeRegistrationFailedError[source]

Bases: EventTypeRegistrationError

Raised if the attempt to register a new event type fails.

class qtrio.RequestedEventTypeUnavailableError(requested_type, returned_type)[source]

Bases: EventTypeRegistrationError

Raised if the requested event type is unavailable.

class qtrio.EventTypeAlreadyRegisteredError[source]

Bases: EventTypeRegistrationError

Raised when a request is made to register an event type but a type has already been registered previously.

class qtrio.ReturnCodeError[source]

Bases: QTrioException

Wraps a QApplication return code as an exception.

class qtrio.InternalError[source]

Bases: QTrioException

Raised when an internal state is inconsistent.

class qtrio.UserCancelledError[source]

Bases: QTrioException

Raised when a user requested cancellation of an operation.

class qtrio.InvalidInputError[source]

Bases: QTrioException

Raised when invalid input is provided such as via a dialog.


class qtrio.QTrioWarning[source]

Bases: UserWarning

Base warning for all QTrio warnings.

class qtrio.ApplicationQuitWarning[source]

Bases: QTrioWarning

Emitted when the Qt application quits but QTrio is expecting to manage the application lifetime. See the documentation on the application lifetime for more information.