webmcp
annotate framework/env/trace/execution_return.lua @ 10:e017c47d43b5
Modified encode.json to avoid special CDATA sequences in output
author | jbe |
---|---|
date | Wed Feb 03 00:57:18 2010 +0100 (2010-02-03) |
parents | 9fdfb27f8e67 |
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 |