ACL uses enums, some more tests, other stuff.
[python_utils.git] / exceptions.py
1 #!/usr/bin/env python3
2
3 # This module is commonly used by others in here and should avoid
4 # taking any unnecessary dependencies back on them.
5
6 class PreconditionException(AssertionError):
7     pass
8
9
10 class PostconditionException(AssertionError):
11     pass
12
13
14 class TimeoutError(Exception):
15     def __init__(self, value: str = "Timed out"):
16         self.value = value
17
18     def __str__(self):
19         return repr(self.value)