"""
Exception types for Deirokay processes.
"""
from .enums import SeverityLevel
[docs]class ValidationError(Exception):
"""Validation failure exception."""
def __init__(self, level: SeverityLevel, message='Validation failed'):
self.level = level
super().__init__(message)
[docs]class InvalidBackend(ValueError):
"""Error in backend definition."""
[docs]class UnsupportedBackend(InvalidBackend):
"""Backend is not supported for this resource."""
[docs]class ParsingError(RuntimeError):
"""Error during file parsing or object conversion."""
[docs]class InvalidStatement(SyntaxError):
"""Error when validating statement construction."""