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

Itamar Shtull-Trauring itamar at itamarst.org
Thu Apr 28 09:27:19 MDT 2005


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>."

http://www.xmlrpc.com/spec





More information about the Twisted-Python mailing list