webmcp
annotate framework/env/trace/execution_return.lua @ 569:5b19007574de
New argument active_link_attr for env.ui.paginate{...}
author | jbe |
---|---|
date | Wed Oct 13 17:21:44 2021 +0200 (2021-10-13) |
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 |