degenbot.exceptions.base ======================== .. py:module:: degenbot.exceptions.base .. autoapi-nested-parse:: Base exception classes for degenbot. Module Contents --------------- .. py:exception:: DegenbotError(*, message: str | None = None) Bases: :py:obj:`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. .. py:attribute:: message :type: str | None :value: None .. py:exception:: DegenbotValueError(*, message: str | None = None) Bases: :py:obj:`DegenbotError` DegenbotValueError error. .. py:exception:: DegenbotTypeError(*, message: str | None = None) Bases: :py:obj:`DegenbotError` DegenbotTypeError error.