degenbot.exceptions.base¶

Base exception classes for degenbot.

Module Contents¶

exception degenbot.exceptions.base.DegenbotError(*, message: str | None = None)¶

Bases: Exception

Base exception used as the parent class for all exceptions raised by this package.

Calling code should catch DegenbotError and derived classes separately before general exceptions, e.g.:

``` try:

degenbot.some_function()

except SpecificDegenbotError:

… # handle a specific exception

except DegenbotError:

… # handle non-specific degenbot exception

except Exception:

… # handle exceptions raised by 3rd party dependencies or Python built-ins

```

An optional string-formatted message may be attached to the exception and retrieved by accessing the .message attribute.

message: str | None = None¶
exception degenbot.exceptions.base.DegenbotValueError(*, message: str | None = None)¶

Bases: DegenbotError

DegenbotValueError error.

exception degenbot.exceptions.base.DegenbotTypeError(*, message: str | None = None)¶

Bases: DegenbotError

DegenbotTypeError error.