From 4a319529d9e8783091040828b910e9cf1f825dbf Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Wed, 5 Feb 2014 19:03:49 +0100 Subject: [PATCH] strict: point error to the stack frame where it occurred Signed-off-by: Tobias Ulmer --- generic/strict.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.5