summaryrefslogtreecommitdiff
path: root/exceptions.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2022-02-08 14:38:15 -0800
committerScott Gasch <[email protected]>2022-02-08 14:38:15 -0800
commit0d63d44ac89aab38fe95f36497adaf95110ab949 (patch)
tree150c4fa334505d17d830592901d6b96b3a4d464e /exceptions.py
parent5c212d7639f62fcb936f9d7a0bbe704a9f7b213d (diff)
More cleanup.
Diffstat (limited to 'exceptions.py')
-rw-r--r--exceptions.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/exceptions.py b/exceptions.py
index 82a82a5..aa0aecb 100644
--- a/exceptions.py
+++ b/exceptions.py
@@ -1,19 +1,28 @@
#!/usr/bin/env python3
+"""Some exceptions used elsewhere."""
+
# This module is commonly used by others in here and should avoid
# taking any unnecessary dependencies back on them.
class PreconditionException(AssertionError):
+ """Use to indicate function preconditions violated."""
+
pass
class PostconditionException(AssertionError):
+ """Use to indicate function postconditions violated."""
+
pass
class TimeoutError(Exception):
+ """Use to indicate an operation that timed out."""
+
def __init__(self, value: str = "Timed out"):
+ super().__init__()
self.value = value
def __str__(self):