[Twisted-Python] Pass error (exception) message to XMLRPC client

Jp Calderone exarkun at divmod.com
Thu Apr 28 11:52:20 EDT 2005

On Thu, 28 Apr 2005 11:29:14 -0400, Itamar Shtull-Trauring <itamar at itamarst.org> wrote:
>On Thu, 2005-04-28 at 14:15 +0000, Jp Calderone wrote:
>>   The behavior of that Fault is defined the _ebRender method of
>> twisted.web.client.xmlrpc.XMLRPC.  Presently it is defined as:
>>     def _ebRender(self, failure):
>>         if isinstance(failure.value, Fault):
>>             return failure.value
>>         log.err(failure)
>>         return Fault(self.FAILURE, "error")
>Notice that this means that if you raise a xmlrpclib.Fault instance as
>the exception that will be used, so you can do that instead of Python

  Re-reading the above, I wonder if there is a reason it doesn't use Failure.check() or Failure.trap()?

>Twisted-Python mailing list
>Twisted-Python at twistedmatrix.com

More information about the Twisted-Python mailing list