Returning Fault instances in xmlrpc
Magnus Lie Hetland
mlh at vier.idi.ntnu.no
Sun May 5 00:53:21 EDT 2002
In article <vPKa0KAM9708Ew9x at jessikat.fsnet.co.uk>, Robin Becker wrote:
[snip]
>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.
But why aren't Fault objects returned when I explicitly return them
from my functions? Shouldn't it either be illegal to return them or
equivalent to raising them?
>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.
Not sure exactly what this says about the Python lib ;)
The specification says nothing about exceptions -- only Fault objects.
I'm just curious about how they interact with Python exceptions, and
how you are supposed to use them in the standard xmlrpclib.
Maybe I'll just have to read the source. <sigh>
Anyway, thanks for your input.
>--
>Robin Becker
--
Magnus Lie Hetland The Anygui Project
http://hetland.org http://anygui.org
More information about the Python-list
mailing list