webmcp

view framework/env/trace/execution_return.lua @ 552:7e874b5227b6

Bugfix in array support: info.type may be nil
author jbe
date Mon Dec 09 16:09:14 2019 +0100 (2019-12-09)
parents 0bbfee4d4aed
children
line source
1 --[[--
2 trace.execution_return{
3 status = status -- optional status
4 }
6 This function is called automatically when returning from a view, action, configuration or filter for logging purposes.
8 --]]--
10 function trace.execution_return(args)
11 if not trace._disabled then
12 local status
13 if args then
14 status = args.status
15 end
16 if status and type(status) ~= "string" then
17 error("Status passed to trace.execution_return{...} is not a string.")
18 end
19 local closed_section = trace._close_section()
20 closed_section.status = status
21 end
22 end

Impressum / About Us