Source code for src.common.exceptions

# =========================================================================== #
# File: exceptions.py                                                         #
# Author: Pfesesani V. van Zyl                                                #
# =========================================================================== #

# Standard library imports
# --------------------------------------------------------------------------- #
import sys
# =========================================================================== #


[docs] class Error(Exception): """ Base class for other exceptions. """ pass
[docs] class InvalidFilePath(Error): """ Raised when a file path is invalid. """ pass
[docs] class InvalidFileExtensionError(Error): """ Raised when a file has an invalid file extension. """ pass
[docs] class EmptyFilePathError(Error): """ Raised when an expected file path is empty. """ pass
[docs] class EmptyFolderError(Error): """ Raised when a folder is empty """ pass
[docs] class MissingChartHeaderError(Error): """ Raised when a fits file is missing a chart header unit. """ pass
[docs] class MissingParameterException(Error): """ Raised when a fits file is missing a chart header unit. """ pass
[docs] class EmptyTableError(Error): """ Raised when a database table is empty. """ pass
[docs] class ValueOutOfRangeException(Error): """ Raised when a value is out of range. """ pass
[docs] class FileResourceNotFoundError(Error): """ Raised when a file resource is not found or wasn't included in the distribution files""" pass
[docs] class DB_READ_ERROR(Error): """ Database read error""" pass
[docs] class DB_WRITE_ERROR(Error): """ Databae write error""" pass
[docs] class BeamTypeNotFoundError(Error): """ Beam type not found error""" pass