Source code for enigma.core.exceptions

[docs]class CoreError(Exception): """Base exception class for Core modules and internal use""" pass
[docs]class UserError(Exception): """Base exception class raised as a byproduct of misconfiguration""" pass
[docs]class PluginError(Exception): """Base exception class for plugin errors""" pass
[docs]class EnvironmentVariableError(UserError): """ Error raised when an environment variable is not configured properly. """ def __init__(self, message): self.message = message
[docs]class DatabaseError(CoreError): """ Error raised when a database operation fails. """ pass
[docs]class DatabaseKeyError(DatabaseError): """ Raised when an attempt to fetch from the key value store fails. """ def __init__(self, message): self.message = message
[docs]class PrimaryKeyError(DatabaseError): """ Raised when there is either a primary key is missing or required. """ def __init__(self, message): self.message = message
[docs]class TableNotFoundError(DatabaseError): """ Raised when a table is missing. """ def __init__(self, message): self.message = message
[docs]class RecordExistsError(DatabaseError): """ Raised when a record already exists. """ def __init__(self, message): self.message = message
[docs]class DatabaseTypeError(DatabaseError): """ Raised when parameters passed are incorrect. """ def __init__(self, message): self.message = message