webmcp
diff framework/env/trace/error.lua @ 0:9fdfb27f8e67
Version 1.0.0
author | jbe/bsw |
---|---|
date | Sun Oct 25 12:00:00 2009 +0100 (2009-10-25) |
parents | |
children | 0bbfee4d4aed |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/framework/env/trace/error.lua Sun Oct 25 12:00:00 2009 +0100 1.3 @@ -0,0 +1,14 @@ 1.4 +--[[-- 1.5 +trace.error{ 1.6 +} 1.7 + 1.8 +This function is called automatically in case of errors to log them. 1.9 + 1.10 +--]]-- 1.11 + 1.12 +function trace.error(args) 1.13 + trace._new_entry { type = "error" } 1.14 + local closed_section = trace._close_section() 1.15 + closed_section.hard_error = true -- TODO: not used, maybe remove 1.16 + trace._stack = { trace._tree } 1.17 +end