webmcp
view framework/env/trace/enter_view.lua @ 70:593413f317f4
Bugfix in Lua5.1 compatibility code: Wrong use of logic-or
| author | jbe | 
|---|---|
| date | Sat Apr 21 20:21:16 2012 +0200 (2012-04-21) | 
| parents | 0bbfee4d4aed | 
| children | 
 line source
     1 --[[--
     2 trace.enter_view{
     3   module = module, 
     4   view   = view
     5 }
     7 This function is used by execute.view and logs the call of a view.
     9 --]]--
    11 function trace.enter_view(args)
    12   if not trace._disabled then
    13     local module = args.module
    14     local view   = args.view
    15     if type(module) ~= "string" then
    16       error("No module passed to trace.enter_view{...}.")
    17     end
    18     if type(view) ~= "string" then
    19       error("No view passed to trace.enter_view{...}.")
    20     end
    21     trace._open_section{ type = "view", module = module, view = view }
    22   end
    23 end
