Source code for revrt.exceptions
# ruff: noqa: N801
"""Custom Exceptions and Errors for revrt"""
import logging
logger = logging.getLogger("revrt")
[docs]
class revrtError(Exception):
"""Generic revrt Error"""
def __init__(self, *args, **kwargs):
"""Init exception and broadcast message to logger"""
super().__init__(*args, **kwargs)
if args:
logger.error(str(args[0]), stacklevel=2)
[docs]
class revrtAttributeError(revrtError, AttributeError):
"""revrt AttributeError"""
[docs]
class revrtConfigurationError(revrtError, ValueError):
"""revrt ConfigurationError"""
[docs]
class revrtFileExistsError(revrtError, FileExistsError):
"""revrt FileExistsError"""
[docs]
class revrtFileNotFoundError(revrtError, FileNotFoundError):
"""revrt FileNotFoundError"""
[docs]
class revrtKeyError(revrtError, KeyError):
"""revrt KeyError"""
[docs]
class revrtNotImplementedError(revrtError, NotImplementedError):
"""revrt NotImplementedError"""
[docs]
class revrtProfileCheckError(revrtError, ValueError):
"""revrt Geotiff Profile Check Error"""
[docs]
class revrtRuntimeError(revrtError, RuntimeError):
"""revrt RuntimeError"""
[docs]
class revrtTypeError(revrtError, TypeError):
"""revrt TypeError"""
[docs]
class revrtValueError(revrtError, ValueError):
"""revrt ValueError"""