Source code for python_project_template_AS.exceptions

"""Custom exceptions used across the mini calculator package.

All exceptions inherit from :class:`CalculatorError` so callers may catch the
base class for broad error handling. Use the more specific subclasses for
programmatic checks in tests or higher-level code.
"""


[docs] class CalculatorError(Exception): """Base exception for calculator errors."""
[docs] class OperationError(CalculatorError): """Raised for operation failures (e.g., wrong arity, invalid input)."""
[docs] class RegistryError(CalculatorError): """Raised for registry errors (duplicate or missing name)."""