webmcp

view framework/env/trace/request.lua @ 382:810c020b0da4

Reverted changes to mondelefant_result_index and mondelefant_result_newindex C-functions (proxying of JSON document)
author jbe
date Mon Nov 16 18:31:49 2015 +0100 (2015-11-16)
parents 0bbfee4d4aed
children
line source
1 --[[--
2 trace.request{
3 module = module,
4 view = view,
5 action = action
6 }
8 This function is called automatically to log which view or action has been requested by the web browser.
10 --]]--
12 function trace.request(args)
13 if not trace._disabled then
14 local module = args.module
15 local view = args.view
16 local action = args.action
17 if type(module) ~= "string" then
18 error("No module string passed to trace.request{...}.")
19 end
20 if view and action then
21 error("Both view and action passed to trace.request{...}.")
22 end
23 if not (view or action) then
24 error("Neither view nor action passed to trace.request{...}.")
25 end
26 if view and type(view) ~= "string" then
27 error("No view string passed to trace.request{...}.")
28 end
29 if action and type(action) ~= "string" then
30 error("No action string passed to trace.request{...}.")
31 end
32 trace._new_entry{
33 type = "request",
34 module = args.module,
35 view = args.view,
36 action = args.action
37 }
38 end
39 end

Impressum / About Us