[Twisted-Python] Throwing exceptions to the client

Itamar Shtull-Trauring twisted at itamarst.org
Fri Jan 25 06:27:22 EST 2002

Cory Dodt wrote:

 > MUCH nicer would be if the server tossed the real exception to the
 > client, not a string.  Referenceable, perhaps.  Is it possible to
 > make this happen when an exception gets raised?

We were discussing having Failures being sent to the client for errors, 
instead of strings, probably as Copyables - but first I gotta do 
Copyables for Java PB. Patches accepted :)

Until then - perhaps you should have a special return code indicating 
the method failed? E.g. have response code such as SUCCESS = 1, FAILURE 
= 2, NOACCESS = 0 or something, instead of depending on exceptions.

More information about the Twisted-Python mailing list