From 1f79e2d34504e7be18f56266b628a6d0ec06a869 Mon Sep 17 00:00:00 2001 From: Lefteris Chatzimparmpas Date: Sun, 18 Nov 2012 23:07:56 +0100 Subject: [PATCH] Correct the error reporting positions. --- src/common.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.lua b/src/common.lua index acbd383..ee1e2b1 100644 --- a/src/common.lua +++ b/src/common.lua @@ -19,7 +19,7 @@ function _check_optional(arg, argtype) if type(arg) ~= 'nil' then if type(argtype) == 'string' then if type(arg) ~= argtype then - error(argtype .. ' argument expected, got ' .. type(arg), 3) + error(argtype .. ' argument expected, got ' .. type(arg), 4) end elseif type(argtype) == 'table' then local b = false @@ -27,7 +27,7 @@ function _check_optional(arg, argtype) if type(arg) == t then b = true end end if b == false then - error(argtype .. ' argument expected, got ' .. type(arg), 3) + error(argtype .. ' argument expected, got ' .. type(arg), 4) end end end