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

Remy Cool mailinglists at smartology.nl
Sat Apr 30 04:41:37 EDT 2005

Itamar Shtull-Trauring wrote:
> On Thu, 2005-04-28 at 10:59 +0200, Remy Cool wrote:
>>described above. XMLRPC support exception handling, and I would like to
>>  use that mechanism rather then coding my own solution.
> XMLRPC's definition of an exception is basically a tuple of an int and
> string. You'll have to do conversion from xmlrpclib's Fault object to
> Python exceptions yourself.
> "The <methodResponse> could also contain a <fault> which contains a
> <value> which is a <struct> containing two elements, one named
> <faultCode>, an <int> and one named <faultString>, a <string>."

My choice of words was maybe a little confusing. My intention is not to 
create python Exceptions from xmlrpc fault objects, but to pass the 
exception string from python to the fault object so the client does know 
what went wrong.

-- Remy --

More information about the Twisted-Python mailing list