webmcp
annotate framework/env/trace/debug_trace.lua @ 31:1cd9e69b85cb
add execute.load_chunk(args)
load_chunk loads the content of a lua file and returns the code.
It can construct the path name easily so you can put helper code in
seperate files for DRYness.
load_chunk loads the content of a lua file and returns the code.
It can construct the path name easily so you can put helper code in
seperate files for DRYness.
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Tue Oct 05 02:34:04 2010 +0200 (2010-10-05) |
parents | 0b7e87f2dc91 |
children |
rev | line source |
---|---|
poelzi@29 | 1 --[[-- |
poelzi@29 | 2 trace.debug_trace( |
poelzi@29 | 3 message -- optional message to add |
poelzi@29 | 4 ) |
poelzi@29 | 5 |
poelzi@29 | 6 This function includes a traceback into the debugging log |
poelzi@29 | 7 |
poelzi@29 | 8 --]]-- |
poelzi@29 | 9 |
poelzi@29 | 10 function trace.debug_trace(message) |
poelzi@29 | 11 trace._new_entry{ type = "traceback", message = tostring(debug.traceback(message or "", 2)) } |
poelzi@29 | 12 end |