webmcp
diff framework/env/trace/error.lua @ 41:0bbfee4d4aed
New functions trace.disable() and trace.is_disabled()
author | jbe |
---|---|
date | Sat Oct 16 17:51:18 2010 +0200 (2010-10-16) |
parents | 9fdfb27f8e67 |
children | a74e62c96501 |
line diff
1.1 --- a/framework/env/trace/error.lua Sat Oct 16 17:49:11 2010 +0200 1.2 +++ b/framework/env/trace/error.lua Sat Oct 16 17:51:18 2010 +0200 1.3 @@ -7,8 +7,10 @@ 1.4 --]]-- 1.5 1.6 function trace.error(args) 1.7 - trace._new_entry { type = "error" } 1.8 - local closed_section = trace._close_section() 1.9 - closed_section.hard_error = true -- TODO: not used, maybe remove 1.10 - trace._stack = { trace._tree } 1.11 + if not trace._disabled then 1.12 + trace._new_entry { type = "error" } 1.13 + local closed_section = trace._close_section() 1.14 + closed_section.hard_error = true -- TODO: not used, maybe remove 1.15 + trace._stack = { trace._tree } 1.16 + end 1.17 end