webmcp

annotate framework/env/trace/execution_return.lua @ 0:9fdfb27f8e67

Version 1.0.0
author jbe/bsw
date Sun Oct 25 12:00:00 2009 +0100 (2009-10-25)
parents
children 0bbfee4d4aed
rev   line source
jbe/bsw@0 1 --[[--
jbe/bsw@0 2 trace.execution_return{
jbe/bsw@0 3 status = status -- optional status
jbe/bsw@0 4 }
jbe/bsw@0 5
jbe/bsw@0 6 This function is called automatically when returning from a view, action, configuration or filter for logging purposes.
jbe/bsw@0 7
jbe/bsw@0 8 --]]--
jbe/bsw@0 9
jbe/bsw@0 10 function trace.execution_return(args)
jbe/bsw@0 11 local status
jbe/bsw@0 12 if args then
jbe/bsw@0 13 status = args.status
jbe/bsw@0 14 end
jbe/bsw@0 15 if status and type(status) ~= "string" then
jbe/bsw@0 16 error("Status passed to trace.execution_return{...} is not a string.")
jbe/bsw@0 17 end
jbe/bsw@0 18 local closed_section = trace._close_section()
jbe/bsw@0 19 closed_section.status = status
jbe/bsw@0 20 end

Impressum / About Us