webmcp

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/framework/env/trace/execution_return.lua	Sun Oct 25 12:00:00 2009 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +--[[--
     1.5 +trace.execution_return{
     1.6 +  status = status        -- optional status
     1.7 +}
     1.8 +
     1.9 +This function is called automatically when returning from a view, action, configuration or filter for logging purposes.
    1.10 +
    1.11 +--]]--
    1.12 +
    1.13 +function trace.execution_return(args)
    1.14 +  local status
    1.15 +  if args then
    1.16 +    status = args.status
    1.17 +  end
    1.18 +  if status and type(status) ~= "string" then
    1.19 +    error("Status passed to trace.execution_return{...} is not a string.")
    1.20 +  end
    1.21 +  local closed_section = trace._close_section()
    1.22 +  closed_section.status = status
    1.23 +end

Impressum / About Us