degenbot.exceptions.infrastructure ================================== .. py:module:: degenbot.exceptions.infrastructure .. autoapi-nested-parse:: Infrastructure and token exceptions. Includes exceptions for: - Database operations (BackupExists) - Anvil fork operations (AnvilError) - ERC-20 token operations (Erc20TokenError, NoPriceOracle) Module Contents --------------- .. py:exception:: BackupExists(path: pathlib.Path) Bases: :py:obj:`degenbot.exceptions.base.DegenbotError` Raised by `degenbot database backup` if a file exists at the target path. .. py:attribute:: path .. py:exception:: AnvilError(method: str, error: str) Bases: :py:obj:`degenbot.exceptions.base.DegenbotError` Raised on errors resulting from failed calls to Anvil via JSON-RPC. This exception is specifically for errors that occur when making RPC calls to an Anvil instance, such as invalid method calls, parameter errors, or other Anvil-specific failures. .. py:attribute:: method .. py:attribute:: error .. py:exception:: Erc20TokenError(*, message: str | None = None) Bases: :py:obj:`degenbot.exceptions.base.DegenbotError` Exception raised inside ERC-20 token helpers. .. py:exception:: NoPriceOracle Bases: :py:obj:`Erc20TokenError` Raised when `.price` is called on a token without a price oracle.