webmcp

annotate framework/env/trace/error.lua @ 179:461e5353ffb1

Limit max depth of JSON documents to 50 (until a better implementation of json.export is available)
author jbe
date Sat Aug 02 00:38:25 2014 +0200 (2014-08-02)
parents 0bbfee4d4aed
children a74e62c96501
rev   line source
jbe/bsw@0 1 --[[--
jbe/bsw@0 2 trace.error{
jbe/bsw@0 3 }
jbe/bsw@0 4
jbe/bsw@0 5 This function is called automatically in case of errors to log them.
jbe/bsw@0 6
jbe/bsw@0 7 --]]--
jbe/bsw@0 8
jbe/bsw@0 9 function trace.error(args)
jbe@41 10 if not trace._disabled then
jbe@41 11 trace._new_entry { type = "error" }
jbe@41 12 local closed_section = trace._close_section()
jbe@41 13 closed_section.hard_error = true -- TODO: not used, maybe remove
jbe@41 14 trace._stack = { trace._tree }
jbe@41 15 end
jbe/bsw@0 16 end

Impressum / About Us