X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=exceptions.py;fp=exceptions.py;h=3e0a2d080b56742d71d1d02ee45ac13fd8d5a146;hb=e0973abee4c917127169795a56fd9c5c5412913c;hp=3ce94d365774422252ab591303907d31ff65d1ba;hpb=bf508f86e1576736d18cab08edbca834456045ee;p=python_utils.git diff --git a/exceptions.py b/exceptions.py index 3ce94d3..3e0a2d0 100644 --- a/exceptions.py +++ b/exceptions.py @@ -9,5 +9,8 @@ class PostconditionException(AssertionError): class TimeoutError(Exception): - pass + def __init__(self, value: str = "Timed out"): + self.value = value + def __str__(self): + return repr(self.value)