diff -r 935b5fcaf152 -r 601fc908d9f1 iro/view/xmlrpc.py --- a/iro/view/xmlrpc.py Thu Jan 26 01:15:33 2012 +0100 +++ b/iro/view/xmlrpc.py Thu Jan 26 01:18:47 2012 +0100 @@ -18,6 +18,7 @@ from ..controller.viewinterface import Interface +from ..error import InterfaceException, ValidateException class TwistedInterface(Interface): @@ -45,7 +46,6 @@ TwistedInterface.__init__(self) def lookupProcedure(self, procedurePath): - logging.debug("lookupProcedure('%s')"%procedurePath) if procedurePath not in self.listProcedures(): raise xmlrpc.NoSuchFunction(self.NOT_FOUND, "procedure %s not found" % procedurePath) @@ -55,6 +55,14 @@ raise xmlrpc.NoSuchFunction(self.NOT_FOUND, "procedure %s not found" % procedurePath) + def _ebRender(self, failure): + if isinstance(failure.value, InterfaceException): + return xmlrpc.Fault(failure.value.code, failure.value.msg) + if isinstance(failure.value, ValidateException): + return xmlrpc.Fault(failure.value.code, failure.value.msg) + return xmlrpc.XMLRPC._ebRender(self, failure) + + class SOAPInterface(TwistedInterface,soap.SOAPPublisher): def __init__(self): soap.SOAPPublisher.__init__(self)