webmcp
diff framework/env/trace/enter_action.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/enter_action.lua Sun Oct 25 12:00:00 2009 +0100 1.3 @@ -0,0 +1,21 @@ 1.4 +--[[-- 1.5 +trace.enter_action{ 1.6 + module = module, 1.7 + action = action 1.8 +} 1.9 + 1.10 +This function is used by execute.action and logs the call of an action. 1.11 + 1.12 +--]]-- 1.13 + 1.14 +function trace.enter_action(args) 1.15 + local module = args.module 1.16 + local action = args.action 1.17 + if type(module) ~= "string" then 1.18 + error("No module string passed to trace.enter_action{...}.") 1.19 + end 1.20 + if type(action) ~= "string" then 1.21 + error("No action string passed to trace.enter_action{...}.") 1.22 + end 1.23 + trace._open_section{ type = "action", module = module, action = action } 1.24 +end