Returning Fault instances in xmlrpc

Robin Becker robin at jessikat.fsnet.co.uk
Sat May 4 07:00:28 EDT 2002


In article <slrnad7d3f.ns6.mlh at vier.idi.ntnu.no>, Magnus Lie Hetland
<mlh at vier.idi.ntnu.no> writes
....
>If I raise a Fault exception in the server, then it is also raised on
>the client side -- is this the way to go? (Will then a proper fault
>value be returned to non-Python clients?)
......
I think raising the Fault on the server is the correct thing to do for
python servers. The server xmlrpclib frameworks seem to trap unhandled
exceptions and turn them into Faults.

I've just been looking at a Delphi client and there I see code that
looks like


 if rtn.IsError then
    begin
      showmessage('Error:' + rtn.GetErrorString);
      result := false;
      exit;
    end;

and this pops up a message box and shows the Fault message.
-- 
Robin Becker



More information about the Python-list mailing list