[Soap-Python] Full traceback in method_exception_object in rpclib

Burak Arslan burak.arslan at arskom.com.tr
Mon Oct 17 13:17:05 CEST 2011


On 10/17/11 13:53, azurIt wrote:
> Hi,
>
> is it somehow possible to access full traceback inside method_exception_object event of rpclib ? I was only albe to access fault string via 'ctx.out_error'. Thnx.

you need to override call_wrapper in either Application or ServiceBase
and do your own exception handling there.

e.g.

class MyException(Fault):
    pass

@classmethod
def call_wrapper(cls,ctx):
    try:
        ServiceBase.call_wrapper(ctx)
    except MyException,e:
        logger.exception(e)
        raise
    except Exception,e:
        raise MyException("Server", "Unknown error")

best,
burak




More information about the Soap mailing list