-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexceptions.py
51 lines (34 loc) · 1.1 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
50
51
"""cell.exceptions"""
from __future__ import absolute_import
__all__ = ['CellError', 'Next', 'NoReplyError', 'NotBoundError']
FRIENDLY_ERROR_FMT = """
Remote method raised exception:
------------------------------------
%s
"""
class CellError(Exception):
"""Remote method raised exception."""
exc = None
traceback = None
def __init__(self, exc=None, traceback=None):
self.exc = exc
self.traceback = traceback
Exception.__init__(self, exc, traceback)
def __str__(self):
return FRIENDLY_ERROR_FMT % (self.traceback, )
class Next(Exception):
"""Used in a gather scenario to signify that no reply should be sent,
to give another agent the chance to reply."""
pass
class NoReplyError(Exception):
"""No reply received within time constraint"""
pass
class NotBoundError(Exception):
"""Object is not bound to a connection."""
pass
class NoRouteError(Exception):
"""Presence: No known route for wanted item."""
pass
class WrongNumberOfArguments(Exception):
"""An actor call method is invoked without arguments"""
pass