Exceptions

Custom exception hierarchy for HyPlan.

All HyPlan-specific exceptions inherit from HyPlanError, making it easy to catch any library error with a single except HyPlanError clause while still allowing callers to handle specific error categories.

Exception hierarchy:

HyPlanError (base)
├── HyPlanValueError  — invalid argument values
├── HyPlanTypeError   — incorrect argument types
└── HyPlanRuntimeError — runtime / state errors (e.g. data not loaded)
exception HyPlanError[source]

Bases: Exception

Base exception for all HyPlan errors.

exception HyPlanValueError[source]

Bases: HyPlanError, ValueError

Raised when an argument has the right type but an invalid value.

Inherits from both HyPlanError and ValueError so that existing except ValueError handlers continue to work.

exception HyPlanTypeError[source]

Bases: HyPlanError, TypeError

Raised when an argument has an unexpected type.

Inherits from both HyPlanError and TypeError so that existing except TypeError handlers continue to work.

exception HyPlanRuntimeError[source]

Bases: HyPlanError, RuntimeError

Raised for runtime or state errors (e.g. required data not loaded).

Inherits from both HyPlanError and RuntimeError so that existing except RuntimeError handlers continue to work.