Source code for pyaicad.errors
"""Exceptions raised by pyaicad."""
from __future__ import annotations
__all__ = ["AicadError", "ModelError", "CheckpointError", "FeatureUnavailableError"]
[docs]
class AicadError(Exception):
"""Base class of the errors raised by pyaicad itself."""
[docs]
class ModelError(AicadError, ValueError):
"""The model, or one of its variables or constraints, is invalid."""
[docs]
class CheckpointError(AicadError):
"""A checkpoint is missing, incomplete, or cannot be used for the requested problems."""
[docs]
class FeatureUnavailableError(AicadError):
"""The feature needs a part of pyaicad that this build does not include.
Training and the neural searches come with the ``learning`` feature of the native library.
"""