# Author: Niels Nuyttens <niels@nannyml.com>
#
# License: Apache Software License 2.0
"""Custom exceptions."""
[docs]class NannyMLException(Exception):
"""Base class for all NannyML exceptions."""
[docs]class InvalidArgumentsException(NannyMLException):
"""An exception indicating that the inputs for a function are invalid."""
[docs]class ChunkerException(NannyMLException):
"""An exception indicating an error occurred somewhere during chunking."""
[docs]class InvalidReferenceDataException(NannyMLException):
"""An exception indicating the reference data provided are invalid."""
[docs]class CalculatorException(NannyMLException):
"""An exception indicating an error occurred during calculation."""
[docs]class EstimatorException(NannyMLException):
"""An exception indicating an error occurred during estimation."""
[docs]class CalculatorNotFittedException(CalculatorException):
"""An exception indicating a calculator was not fitted before using it in calculations."""
[docs]class NotFittedException(NannyMLException):
"""An exception indicating an object was not fitted before using it."""
[docs]class WriterException(NannyMLException):
"""An exception indicating something went wrong whilst trying to write out results."""
[docs]class ReaderException(NannyMLException):
"""An exception indicating something went wrong whilst trying to read out data."""
[docs]class IOException(NannyMLException):
"""An exception indicating something went wrong during IO."""
[docs]class StoreException(NannyMLException):
"""An exception indicating something went wrong whilst using a store."""
[docs]class SerializeException(NannyMLException):
"""An exception occurring when serialization some object went wrong."""
[docs]class DeserializeException(NannyMLException):
"""An exception occurring when deserialization some object went wrong."""
[docs]class ThresholdException(NannyMLException):
"""An exception occurring during threshold creation or calculation."""