Skip to content
Snippets Groups Projects
Commit f85086bf authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

WIP: Start entity errors

parent cd46e4d5
Branches
Tags
1 merge request!11DOC: Update tutorial on error handling
Pipeline #7919 failed
...@@ -47,10 +47,10 @@ errors<EntityError>` which you can inspect in order to learn why the ...@@ -47,10 +47,10 @@ errors<EntityError>` which you can inspect in order to learn why the
transaction failed. For this inspection, there are some helpful transaction failed. For this inspection, there are some helpful
attributes and methods provided by the ``TransactionError``: attributes and methods provided by the ``TransactionError``:
* ``entities``: a set of all entities that caused at least one error * ``entities``: a list of all entities that caused at least one error
in this transaction in this transaction
* ``errors``: a set of all ``EntityError`` objects that occurred during * ``errors``: a list of all ``EntityError`` objects that occurred during
the transaction. the transaction.
* ``has_error(error_t)``: Check whether an error of type ``error_t`` * ``has_error(error_t)``: Check whether an error of type ``error_t``
...@@ -78,12 +78,20 @@ with only one item—``[self]``. ...@@ -78,12 +78,20 @@ with only one item—``[self]``.
Special Errors Special Errors
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
Subclasses of ``EntityError`` for special purposes: \* Subclasses of ``EntityError`` for special purposes:
``EntityDoesNotExistError`` \* ``EntityHasNoDataTypeError`` \*
``UniqueNamesError`` \* ``UnqualifiedParentsError`` - overrides * ``EntityDoesNotExistError``
``get_entities()``: returns all parent entities with errors. - overrides
``get_errors()``: returns a list of EntityErrors which have been caused * ``EntityHasNoDataTypeError``
by parent entities. \* ``UnqualifiedPropertiesError`` - overrides
``get_entities()``: returns all properties with errors. - overrides * ``UniqueNamesError``
``get_errors()``: returns a list of EntityErrors which have been caused
by properties. * ``UnqualifiedParentsError``
* ``UnqualifiedPropertiesError``
* ``ConsistencyError``
* ``AuthorizationError``
* ``AmbiguousEntityError``
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment