From 50c7c915ee2fa239043d5456237f5145d064089b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 19 Nov 2024 14:09:18 -0300 Subject: Debug information about extra arguments from __call 'debug.getinfo' can return number of extra arguments added to a call by a chain of __call metavalues. That information is being used to improve error messages about errors in these extra arguments. --- ltests.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 8191f14a..3edf805e 100644 --- a/ltests.c +++ b/ltests.c @@ -1900,6 +1900,10 @@ static struct X { int x; } x; else if EQ("closeslot") { lua_closeslot(L1, getnum); } + else if EQ("argerror") { + int arg = getnum; + luaL_argerror(L1, arg, getstring); + } else luaL_error(L, "unknown instruction %s", buff); } return 0; -- cgit v1.2.3-55-g6feb