LUAL_ARGERROR(3) Library Functions Manual LUAL_ARGERROR(3)

luaL_argerrorraises an error with the message, function indicator [-0, +0, v]

#include <lauxlib.h>

int
luaL_argerror(lua_State *L, int narg, const char *extramsg);

() raises an error with the following message, where func is retrieved from the call stack:

bad argument #<narg> to <func> (<extramsg>)

This function never returns, but it is an idiom to use it in C functions as return .

Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.

The luaL_argerror() manual page is based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.

July 24, 2022 Debian