From: Tobias Ulmer Date: Wed, 5 Feb 2014 18:03:49 +0000 (+0100) Subject: strict: point error to the stack frame where it occurred X-Git-Tag: e2factory-2.3.15rc1~236 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=4a319529d9e8783091040828b910e9cf1f825dbf;p=e2factory.git strict: point error to the stack frame where it occurred Signed-off-by: Tobias Ulmer --- diff --git a/generic/strict.lua b/generic/strict.lua index 02b71d1..27834de 100644 --- a/generic/strict.lua +++ b/generic/strict.lua @@ -63,7 +63,7 @@ function strict.lock(t) mt.__index = function(t, k, v) local mt = getmetatable(t) if type(k) == 'string' and not mt.__declared[k] and what() ~= "C" then - error("variable "..k.." is not declared") + error("variable "..k.." is not declared", 2) end return rawget(t, k)