[Zope] xmlrpc error handling
pw_lists at slinkp.com
Wed Apr 11 14:14:07 EDT 2007
On Wed, Apr 11, 2007 at 01:38:21PM -0400, Kevin wrote:
> In order to avoid zodb implosion, is it sufficient to raise an xmlrpclib
> Fault object from a method where some validation was not successful?
> Will zope abort transactions
> and avoid an other avoidable bad things
> from happening?
as long as your application is designed well with regard to
transaction boundaries, you'll be fine. Inconsistencies could arise
if your app does something weird like manually commit a transaction
and start a new one before the exception is raised...
> Do I have to use fault or can I raise just any error an
> ZPublisher.xmlrpc will marshall it
> into <fault></fault>?
The latter. Try it and see :)
AFAICT any uncaught exception will be published as an xmlrpc fault.
But then I think you don't have control of the fault code, if you care
More information about the Zope