2026-01-28 06:16:04 +00:00

41 lines
1.0 KiB
Python

"""
Exceptions that can occur when testing an input image.
"""
class Error(Exception):
"""Base class for exceptions.
Arguments:
message: String of the reason the exception was raised
"""
def __init__(self, message=''):
super(Error, self).__init__(message)
self.message = message
def __str__(self):
return self.message
class ConfigError(Error):
"""Base class for exceptions caused by incorrect input configurations."""
pass
class InvalidInputError(ConfigError):
"""Raised when an input configuration is invalid."""
pass
class RequiredConfigError(ConfigError):
"""Raised when an input configuration is needed but missing."""
pass
class TypeConfigError(ConfigError):
"""Raised when an input configuration is the incorrect type."""
pass
class UnsupportedConfigError(ConfigError):
"""Raised when an input configuration is not supported."""
pass
class LibError(Error):
"""Raised when the shared C library encounters an error."""
pass