-
Notifications
You must be signed in to change notification settings - Fork 0
/
exceptions.py
49 lines (33 loc) · 1.32 KB
/
exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
class OTPException(Exception):
def __init__(self, msg, original_exception):
super(OTPException, self).__init__(msg + (": %s" % original_exception))
self.original_exception = original_exception
class OTPError(Exception):
def __init__(self, msg, context=None):
super(OTPError, self).__init__(msg)
self.msg = msg
self.context = context
class OTPTrivialPath(OTPError):
def __init__(self, msg, context=None):
super(OTPTrivialPath, self).__init__(msg, context)
class OTPNoPath(OTPError):
def __init__(self, msg, context=None):
super(OTPNoPath, self).__init__(msg, context)
class OTPUnreachable(OTPError):
def __init__(self, msg, context=None):
super(OTPUnreachable, self).__init__(msg, context)
class OTPGeneralRouting(OTPError):
def __init__(self, msg, context=None):
super(OTPGeneralRouting, self).__init__(msg, context)
class DrtUndeliverable(Exception):
def __init__(self, msg):
super(DrtUndeliverable, self).__init__(msg)
self.msg = msg
class DrtUnassigned(Exception):
def __init__(self, msg):
super(DrtUnassigned, self).__init__(msg)
self.msg = msg
class PTStopServiceOutsideZone(Exception):
def __init__(self, msg):
super(PTStopServiceOutsideZone, self).__init__(msg)
self.msg = msg