aboutsummaryrefslogtreecommitdiffstats
path: root/prosody
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-12-10 02:47:13 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-12-10 02:47:13 +0500
commiteaa3a4e22570bb7ce13f6c372a2033d33c712ef9 (patch)
tree3072f042ff001830824db7fe7ce8e5f3d469e64b /prosody
parent26df5eea856fb8b6f9a4b312eb8b5341fa828ad6 (diff)
downloadprosody-eaa3a4e22570bb7ce13f6c372a2033d33c712ef9.tar.gz
prosody-eaa3a4e22570bb7ce13f6c372a2033d33c712ef9.zip
prosody: Log a warning and traceback, but don't throw an error on nil global read.
Diffstat (limited to 'prosody')
-rwxr-xr-xprosody2
1 files changed, 1 insertions, 1 deletions
diff --git a/prosody b/prosody
index 95be55e3..2ca4241c 100755
--- a/prosody
+++ b/prosody
@@ -286,7 +286,7 @@ end
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;
};