Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
f85086bf
Commit
f85086bf
authored
May 28, 2021
by
Florian Spreckelsen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: Start entity errors
parent
cd46e4d5
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!11
DOC: Update tutorial on error handling
Pipeline
#7919
failed
May 28, 2021
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/doc/tutorials/errors.rst
+19
-11
19 additions, 11 deletions
src/doc/tutorials/errors.rst
with
19 additions
and
11 deletions
src/doc/tutorials/errors.rst
+
19
−
11
View file @
f85086bf
...
@@ -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 s
e
t of all entities that caused at least one error
* ``entities``: a
li
st of all entities that caused at least one error
in this transaction
in this transaction
* ``errors``: a s
e
t of all ``EntityError`` objects that occurred during
* ``errors``: a
li
st 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``
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment