From b83766b4c96e1b7edbef628a6b5abc44990fe105 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 27 Aug 2009 17:55:47 +0200 Subject: [PATCH] luaa: emit signal on runtime error Signed-off-by: Julien Danjou --- luaa.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/luaa.c b/luaa.c index 7c94dac0..d508e8b0 100644 --- a/luaa.c +++ b/luaa.c @@ -683,6 +683,11 @@ luaA_panic(lua_State *L) static int luaA_dofunction_on_error(lua_State *L) { + /* duplicate string error */ + lua_pushvalue(L, -1); + /* emit error signal */ + signal_object_emit(L, &global_signals, "debug::error", 1); + if(!luaL_dostring(L, "return debug.traceback(\"error while running function\", 3)")) { /* Move traceback before error */ -- 2.11.4.GIT