From: Vsevolod Stakhov Date: Sat, 22 Oct 2016 11:26:45 +0000 (+0100) Subject: [Minor] Show real message on lua load errors X-Git-Tag: 1.4.0~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40bca7aba4b2070ed2910368c4914f36b3f142cb;p=thirdparty%2Frspamd.git [Minor] Show real message on lua load errors --- diff --git a/src/rspamadm/lua_repl.c b/src/rspamadm/lua_repl.c index ce764c7f8e..0245617338 100644 --- a/src/rspamadm/lua_repl.c +++ b/src/rspamadm/lua_repl.c @@ -170,7 +170,7 @@ rspamadm_lua_load_script (lua_State *L, const gchar *path) if (luaL_loadfile (L, path) != 0) { rspamd_fprintf (stderr, "cannot load script %s: %s\n", - path, strerror (errno)); + path, lua_tostring (L, -1)); lua_settop (L, 0); return FALSE; @@ -299,7 +299,7 @@ rspamadm_lua_exec_handler (lua_State *L, gint argc, gchar **argv) if (luaL_loadfile (L, argv[i]) != 0) { rspamd_fprintf (stderr, "cannot load script %s: %s\n", - argv[i], strerror (errno)); + argv[i], lua_tostring (L, -1)); lua_settop (L, 0); return;