webmcp
annotate framework/env/trace/execution_return.lua @ 562:328f120924a2
Removed if-clause when initializing file descriptor set to avoid compiler warning for mondelefant_conn_try_wait
author | jbe |
---|---|
date | Fri Feb 05 15:51:39 2021 +0100 (2021-02-05) |
parents | 0bbfee4d4aed |
children |
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@41 | 11 if not trace._disabled then |
jbe@41 | 12 local status |
jbe@41 | 13 if args then |
jbe@41 | 14 status = args.status |
jbe@41 | 15 end |
jbe@41 | 16 if status and type(status) ~= "string" then |
jbe@41 | 17 error("Status passed to trace.execution_return{...} is not a string.") |
jbe@41 | 18 end |
jbe@41 | 19 local closed_section = trace._close_section() |
jbe@41 | 20 closed_section.status = status |
jbe/bsw@0 | 21 end |
jbe/bsw@0 | 22 end |