-
Notifications
You must be signed in to change notification settings - Fork 76
/
errors.py
85 lines (50 loc) · 1.7 KB
/
errors.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
class OpException(Exception):
"""Ophyd base exception class"""
pass
class ReadOnlyError(OpException):
"""Signal is read-only"""
pass
class LimitError(ValueError, OpException):
"""Value is outside of defined limits"""
pass
class DisconnectedError(OpException):
"""Signal or Device is not connected to EPICS"""
pass
class DestroyedError(RuntimeError, DisconnectedError):
"""Signal or Device has been destroyed and is no longer usable"""
pass
class ExceptionBundle(RuntimeError, OpException):
"""One or more exceptions was raised during a loop of try/except blocks"""
def __init__(self, msg, exceptions):
super().__init__(msg)
self.exceptions = exceptions
class RedundantStaging(OpException):
pass
class PluginMisconfigurationError(TypeError, OpException):
# Keeping TypeError for backward-compatibility
pass
class UnprimedPlugin(RuntimeError, OpException):
...
class UnknownStatusFailure(OpException):
"""
Generic error when a Status object is marked success=False without details.
"""
...
class StatusTimeoutError(TimeoutError, OpException):
"""
Timeout specified when a Status object was created has expired.
"""
...
class WaitTimeoutError(TimeoutError, OpException):
"""
TimeoutError raised when we ware waiting on completion of a task.
This is distinct from TimeoutError, just as concurrent.futures.TimeoutError
is distinct from TimeoutError, to differentiate when the task itself has
raised a TimeoutError.
"""
...
class InvalidState(RuntimeError, OpException):
"""
When Status.set_finished() or Status.set_exception(exc) is called too late
"""
...