service: fix SerializedInvoker CallError handling.
This cutpaste needs refactored. Ensure the caller receives a copy of the exception.
This commit is contained in:
parent
45b748833d
commit
205052ed90
|
@ -271,9 +271,12 @@ class SerializedInvoker(Invoker):
|
||||||
method_name, kwargs, msg = tup
|
method_name, kwargs, msg = tup
|
||||||
try:
|
try:
|
||||||
super(SerializedInvoker, self).invoke(method_name, kwargs, msg)
|
super(SerializedInvoker, self).invoke(method_name, kwargs, msg)
|
||||||
|
except mitogen.core.CallError:
|
||||||
|
e = sys.exc_info()[1]
|
||||||
|
LOG.warning('%r: call error: %s: %s', self, msg, e)
|
||||||
|
msg.reply(e)
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.exception('%r: while invoking %r of %r',
|
LOG.exception('%r: while invoking %s()', self, method_name)
|
||||||
self, method_name, self.service)
|
|
||||||
msg.reply(mitogen.core.Message.dead())
|
msg.reply(mitogen.core.Message.dead())
|
||||||
|
|
||||||
def invoke(self, method_name, kwargs, msg):
|
def invoke(self, method_name, kwargs, msg):
|
||||||
|
|
Loading…
Reference in New Issue