From e0e0d361a445a4f5cca9bdc77a23dbdfe75bebed Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 24 Feb 2020 09:49:30 +0000 Subject: [Minor] Lpeg: Improve logging on type mismatch --- contrib/lua-lpeg/lptree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/lua-lpeg/lptree.c b/contrib/lua-lpeg/lptree.c index f4a58dbf0..4920f8f89 100644 --- a/contrib/lua-lpeg/lptree.c +++ b/contrib/lua-lpeg/lptree.c @@ -1187,7 +1187,8 @@ static int lp_match (lua_State *L) { #ifdef LPEG_LUD_WORKAROUND lpeg_free_mem_low (capture); #endif - return luaL_error (L, "invalid argument"); + return luaL_error (L, "invalid argument: %s", + lua_typename (L, lua_type (L, SUBJIDX))); } size_t i = initposition(L, l); int ptop = lua_gettop(L), rs; -- cgit v1.2.3