# HG changeset patch # User Waqas Hussain # Date 1260395233 -18000 # Node ID d8e83625ad58d973faf8a8022ad626ebc359097d # Parent 914d7afb82127f6e8715751fe21fa8f22aa4be28 prosody: Log a warning and traceback, but don't throw an error on nil global read. diff -r 914d7afb8212 -r d8e83625ad58 prosody --- a/prosody Thu Dec 10 01:56:16 2009 +0500 +++ b/prosody Thu Dec 10 02:47:13 2009 +0500 @@ -286,7 +286,7 @@ function init_global_protection() -- Catch global accesses local locked_globals_mt = { - __index = function (t, k) error("Attempt to read a non-existent global '"..k.."'", 2); end; + __index = function (t, k) log("warn", "%s", debug.traceback("Attempt to read a non-existent global '"..k.."'", 2)); end; __newindex = function (t, k, v) error("Attempt to set a global: "..tostring(k).." = "..tostring(v), 2); end; };