Skip to content

Errors

pyconvexity.core.errors

Error classes for PyConvexity.

These mirror the error handling from the original Rust implementation while providing Python-specific enhancements.

PyConvexityError

Bases: Exception

Base exception for all PyConvexity errors

DatabaseError

Bases: PyConvexityError

Database-related errors

ConnectionError

Bases: DatabaseError

Database connection failed

ValidationError

Bases: PyConvexityError

Data validation error

ComponentNotFound

Bases: PyConvexityError

Component not found in database

AttributeNotFound

Bases: PyConvexityError

Attribute not found for component

InvalidDataType

Bases: ValidationError

Invalid data type for attribute

TimeseriesError

Bases: PyConvexityError

Timeseries serialization/deserialization error

NetworkNotFound

Bases: PyConvexityError

Network not found in database

ScenarioNotFound

Bases: PyConvexityError

Scenario not found in database

CarrierNotFound

Bases: PyConvexityError

Carrier not found in database