Exceptions¶
Every exception raised by pdv inherits from PDVError, so user
code can catch all PDV-specific errors in a single clause:
from pdv import PDVError
try:
pdv_tree['results.bad.path'] = compute()
except PDVError as exc:
print(f'PDV rejected the write: {exc}')
All exception types are importable from pdv.errors. PDVError
itself is also re-exported from the top-level pdv package.
PDVError
¶
Bases: Exception
Base exception for all pdv errors.
PDVPathError
¶
Bases: PDVError
Raised when a path is invalid, escapes the project root, or is otherwise unsafe.
PDVProtectedNameError
¶
Bases: PDVError
Raised when user code attempts to reassign a protected kernel namespace name.
PDVSerializationError
¶
Bases: PDVError
Raised when a value cannot be serialized to or deserialized from disk.