summaryrefslogtreecommitdiff
path: root/exceptions.py
blob: 82a82a566b1b1da50af1942364761722c09f047c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python3

# This module is commonly used by others in here and should avoid
# taking any unnecessary dependencies back on them.


class PreconditionException(AssertionError):
    pass


class PostconditionException(AssertionError):
    pass


class TimeoutError(Exception):
    def __init__(self, value: str = "Timed out"):
        self.value = value

    def __str__(self):
        return repr(self.value)