"""Custom exceptions for the hvacpy package.
All hvacpy-specific exceptions are defined here. No exceptions are
defined in any other module.
"""
[docs]
class HvacpyError(Exception):
"""Base exception for all hvacpy errors."""
[docs]
class UnitError(HvacpyError, ValueError):
"""Raised when a Quantity has an incompatible unit."""
[docs]
class MaterialNotFoundError(HvacpyError, KeyError):
"""Raised when a material key is not in the database."""
[docs]
class LoadCalculationError(HvacpyError, ValueError):
"""Raised when a load calculation cannot be completed."""
[docs]
class DesignConditionsNotFoundError(HvacpyError, KeyError):
"""Raised when a city is not in the design conditions database."""
[docs]
class EquipmentSizingError(HvacpyError, ValueError):
"""Raised when load exceeds all available nominal sizes."""
[docs]
class AirflowCalculationError(HvacpyError, ValueError):
"""Raised when airflow calculation has invalid inputs."""
[docs]
class DuctSizingError(HvacpyError, ValueError):
"""Raised when duct sizing fails to converge."""