diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-02-24 09:49:30 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-02-24 09:49:30 +0000 |
commit | e0e0d361a445a4f5cca9bdc77a23dbdfe75bebed (patch) | |
tree | 37efc718da82057de076cda85a79b385614f63b5 | |
parent | 9def8135c34d06a01839e1cfbbe970438c76ddce (diff) | |
download | rspamd-e0e0d361a445a4f5cca9bdc77a23dbdfe75bebed.tar.gz rspamd-e0e0d361a445a4f5cca9bdc77a23dbdfe75bebed.zip |
[Minor] Lpeg: Improve logging on type mismatch
-rw-r--r-- | contrib/lua-lpeg/lptree.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |