exceptions

Module: espressodb.base.exceptions

ConsistencyError(error, instance[, data])

Error which is raised during consistency checks.


Custom exceptions used in EspressoDB

exception ConsistencyError(error, instance, data=None)[source]

Error which is raised during consistency checks.

The consistency checks are called when a model is saved or created with the safe option. This Error wraps individual exceptions to provide more verbose information.

__init__(error, instance, data=None)[source]

Initialize consistency error and prepares custom error method.

Parameters
  • error (Exception) – The original Exception which was raised by the check

  • model – The model which raises the check

  • data (Optional[Dict[str, Any]]) – The data the model was checked with.

__weakref__

list of weak references to the object (if defined)