1 """errors for the concurrent package"""
2
3 import traceback
4
5 __all__=['ConcurrentError', 'TimeoutError', 'SendError', 'ReceiveError', 'BoxFullError',
6 'BoxClosedError', 'BoxEmptyError', 'CrashError']
7
9 """base class for errors in this package"""
10 pass
11
13 """error for general timeouts"""
14 pass
15
17 """error raised when sending fails"""
18 pass
19
21 """error raised when receive fails"""
22 pass
23
25 """error raised when a mailbox is full"""
26 pass
27
29 """error raised when a mailbox is closed"""
30
32 """error raised when a mailbox is empty"""
33 pass
34
35
37 """error raised when a message recipient chokes
38
39 @ivar type: the type of the exception
40 @type type: type
41
42 @ivar value: the exception instance
43 @type value: instance
44
45 @ivar traceback: a stringified traceback that produced the exception. May
46 be None
47 @type traceback: traceback
48 """
49 __slots__=['type', 'value', 'traceback']
50
52 self.type=etype
53 self.value=value
54 self.traceback="".join(traceback.format_exception(etype, value, tb))
55
56
57 Exception.__init__(self, etype, value, self.traceback)
58