1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

display lua hooks errors

This commit is contained in:
Marco Migliori 2017-05-16 18:46:56 +02:00 committed by Witold Filipczyk
parent 25c2850b59
commit f1fb95835a

View File

@ -660,8 +660,10 @@ do_hooks_file(LS, unsigned char *prefix, unsigned char *filename)
if (file_can_read(file)) {
int oldtop = lua_gettop(S);
if (luaL_dofile(S, file) != 0)
if (luaL_dofile(S, file) != 0) {
printf("%s: %s\n", file, lua_tostring(L, -1));
sleep(3); /* Let some time to see error messages. */
}
lua_settop(S, oldtop);
}