aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/utils/errors.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2022-12-08 16:35:20 +0100
committerMatthias Baumgartner <dev@igsor.net>2022-12-08 16:35:20 +0100
commit547aa08b1f05ec0cdf725c34a7b1d1512b694063 (patch)
tree0bc59fb50af55b681da77540728cb557ee544496 /bsfs/utils/errors.py
parent7eb61d117a995b076d36c55d2c7c268665360813 (diff)
downloadbsfs-547aa08b1f05ec0cdf725c34a7b1d1512b694063.tar.gz
bsfs-547aa08b1f05ec0cdf725c34a7b1d1512b694063.tar.bz2
bsfs-547aa08b1f05ec0cdf725c34a7b1d1512b694063.zip
remaining essentials: uuid, errors
Diffstat (limited to 'bsfs/utils/errors.py')
-rw-r--r--bsfs/utils/errors.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/bsfs/utils/errors.py b/bsfs/utils/errors.py
new file mode 100644
index 0000000..04561a2
--- /dev/null
+++ b/bsfs/utils/errors.py
@@ -0,0 +1,38 @@
+"""
+
+Part of the BlackStar filesystem (bsfs) module.
+A copy of the license is provided with the project.
+Author: Matthias Baumgartner, 2022
+"""
+# imports
+import typing
+
+# exports
+__all__: typing.Sequence[str] = (
+ )
+
+
+## code ##
+
+class _BSFSError(Exception):
+ """Generic bsfs error."""
+
+class SchemaError(_BSFSError):
+ """Generic schema errios."""
+
+class ConsistencyError(SchemaError):
+ """A requested operation is inconsistent with the schema."""
+
+class InstanceError(SchemaError):
+ """An instance affected by some operation is inconsistent with the schema."""
+
+class PermissionDeniedError(_BSFSError):
+ """An operation was aborted due to access control restrictions."""
+
+class ProgrammingError(_BSFSError):
+ """An assertion-like error that indicates a code-base issue."""
+
+class UnreachableError(ProgrammingError):
+ """Bravo, you've reached a point in code that should logically not be reachable."""
+
+## EOF ##