aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamadm/lua_repl.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-22 12:26:45 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-22 12:26:45 +0100
commit40bca7aba4b2070ed2910368c4914f36b3f142cb (patch)
treeaf5ad63ebc1256ea490900a4832aaca79fdaed30 /src/rspamadm/lua_repl.c
parent0c16e0e4d73d8415983a49751bde7678461986c3 (diff)
downloadrspamd-40bca7aba4b2070ed2910368c4914f36b3f142cb.tar.gz
rspamd-40bca7aba4b2070ed2910368c4914f36b3f142cb.zip
[Minor] Show real message on lua load errors
Diffstat (limited to 'src/rspamadm/lua_repl.c')
-rw-r--r--src/rspamadm/lua_repl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rspamadm/lua_repl.c b/src/rspamadm/lua_repl.c
index ce764c7f8..024561733 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;