27 Apr
2005
27 Apr
'05
2:34 p.m.
Remy C Cool <remy.cool@smartology.nl> writes:
Hello,
I've searched on the (Twisted) website and mailinglists, but failed to find the answer to my question.
Is is possible to pass the original exception code/message to the XMLRPC client? When an exception occurs, the client get's a general 'error occured' message and I would like to be able to let the client know what went wrong. How can I accomplish this with Twisted?
It isn't really an exception but I use the idiom of returning an (int,string) tuple: (err,error_message) If err != 0, it's interpreted as an error code. A successful return is (0,""). I don't happen to do it, but I suppose you could then raise an exception on the client size by hand when non-zero is returned. -Brett.