]> git.e2factory.org Git - e2factory.git/commitdiff
strict: point error to the stack frame where it occurred
authorTobias Ulmer <tu@emlix.com>
Wed, 5 Feb 2014 18:03:49 +0000 (19:03 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:17 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/strict.lua

index 02b71d12b23814d783106d8a227a842622cb6a15..27834de13afe2372a269561703437df9afff9290 100644 (file)
@@ -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)