X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=exceptions.py;h=59aa262d786a11297e1462ff782ed2e47034c16d;hb=2c43e31aae1138f79c30619cde25746e41390152;hp=3ce94d365774422252ab591303907d31ff65d1ba;hpb=bf508f86e1576736d18cab08edbca834456045ee;p=python_utils.git diff --git a/exceptions.py b/exceptions.py index 3ce94d3..59aa262 100644 --- a/exceptions.py +++ b/exceptions.py @@ -1,5 +1,8 @@ #!/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 @@ -9,5 +12,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)