aboutsummaryrefslogtreecommitdiffstats
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
commitbfd186796265118561ca5b37f4847a77a694c51c (patch)
treefeb496e6d56fb8de8768a68d94bcaa8f5975fe0d
parent9d431743f91a605ce3aabf17e8d3b2131a3d045c (diff)
downloadprosody-bfd186796265118561ca5b37f4847a77a694c51c.tar.gz
prosody-bfd186796265118561ca5b37f4847a77a694c51c.zip
prosody: Log a warning and traceback, but don't throw an error on nil global read.
-rwxr-xr-xprosody2
1 files changed, 1 insertions, 1 deletions
diff --git a/prosody b/prosody
index 06391df4..9ed1269c 100755
--- a/prosody
+++ b/prosody
@@ -296,7 +296,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;
};