3 """Some exceptions used elsewhere."""
5 # This module is commonly used by others in here and should avoid
6 # taking any unnecessary dependencies back on them.
9 class PreconditionException(AssertionError):
10 """Use to indicate function preconditions violated."""
15 class PostconditionException(AssertionError):
16 """Use to indicate function postconditions violated."""
21 class TimeoutError(Exception):
22 """Use to indicate an operation that timed out."""
24 def __init__(self, value: str = "Timed out"):
29 return repr(self.value)