Source code for cellpy.exceptions

"""Exceptions defined within cellpy."""

from cellpycore.exceptions import CellpyError, NoDataFound


[docs] class Error(Exception): """Base class for other exceptions (legacy; prefer :class:`CellpyError`).""" pass
[docs] class ConfigFileNotWritten(Error): """Raised when the configuration file cannot be written""" pass
[docs] class ConfigFileNotRead(Error): """Raised when the configuration file cannot be read""" pass
[docs] class FileNotFound(Error): """Raised when the given file is not found""" pass
[docs] class SearchError(Error): """Raised when the search function fails""" pass
[docs] class WrongFileVersion(Error): """Raised when the file version is wrong""" pass
[docs] class CorruptCellpyFile(IOError, CellpyError): """Raised when a cellpy file is structurally corrupt.""" pass
[docs] class ConfigurationError(CellpyError): """Raised when configuration validation fails.""" pass
[docs] class UnitsError(ValueError, CellpyError): """Raised when unit labels or scales are invalid.""" pass
[docs] class LoaderError(CellpyError): """Raised when instrument ingestion fails.""" pass
[docs] class DeprecatedFeature(Error): """Raised when the feature is recently deprecated""" pass
[docs] class ExportFailed(Error): """Raised when exporting data failed""" pass
[docs] class IOError(Error): """Raised when exporting data failed""" pass
[docs] class NullData(Error): """Raised when required data is missing (e.g. voltage = None or summary_frames are missing)""" pass
[docs] class UnderDefined(Error): """Raised when trying something that requires you to set a missing prm on environment variable first""" pass
__all__ = [ "CellpyError", "NoDataFound", "Error", "ConfigFileNotWritten", "ConfigFileNotRead", "FileNotFound", "SearchError", "WrongFileVersion", "CorruptCellpyFile", "ConfigurationError", "UnitsError", "LoaderError", "DeprecatedFeature", "ExportFailed", "IOError", "NullData", "UnderDefined", ]