The Application class is the glue between one or more service definitions, input and output protocols.
Called right before the service method is executed
Called right after the service method is executed
Called when an exception occurred in a service method, before the exception is serialized.
Called from the constructor of the MethodContext instance.
Called from the close() function of the MethodContext instance, which in turn is called by the transport when the response is fully sent to the client (or in the client case, the response is fully received from server).
This method calls the call_wrapper method in the service definition. This can be overridden to make an application-wide custom exception management.
Takes a MethodContext instance. Returns the response to the request as a native python object. If the function throws an exception, it returns None and sets the exception object to ctx.out_error.
Overriding this method would break event management. So this is not meant to be overridden unless you know what you’re doing.
Call this function first thing in your main function to return original python errors to your clients in case of unhandled exceptions.