aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/utils/errors.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2022-12-18 14:21:11 +0100
committerMatthias Baumgartner <dev@igsor.net>2022-12-18 14:21:11 +0100
commit91437ba89d35bf482f3d9671bb99ef2fc69f5985 (patch)
treee9bfe27e5a641c040cfa8fe747a7cbb28091079c /bsfs/utils/errors.py
parent87e4cd5a4581094f490f79d4f1cf91f51897660f (diff)
parente94368c75468e3e94382b12705e55d396249eaca (diff)
downloadbsfs-91437ba89d35bf482f3d9671bb99ef2fc69f5985.tar.gz
bsfs-91437ba89d35bf482f3d9671bb99ef2fc69f5985.tar.bz2
bsfs-91437ba89d35bf482f3d9671bb99ef2fc69f5985.zip
Merge branch 'develop' into main
Diffstat (limited to 'bsfs/utils/errors.py')
-rw-r--r--bsfs/utils/errors.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/bsfs/utils/errors.py b/bsfs/utils/errors.py
new file mode 100644
index 0000000..c5e8e16
--- /dev/null
+++ b/bsfs/utils/errors.py
@@ -0,0 +1,41 @@
+"""
+
+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."""
+
+class ConfigError(_BSFSError):
+ """User config issue."""
+
+## EOF ##