From: Vsevolod Stakhov Date: Tue, 11 Nov 2014 17:36:03 +0000 (+0000) Subject: Be more informative about lua errors. X-Git-Tag: 0.7.5~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45fb7d18cac903e5950261113c0c3e4c2624a9df;p=thirdparty%2Frspamd.git Be more informative about lua errors. --- diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index f22a1503fb..d1f456a9f1 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -1081,8 +1081,12 @@ process_regexp_item (struct rspamd_task *task, void *user_data) /* Non-threaded version */ if (item->lua_function) { /* Just call function */ - if (rspamd_lua_call_expression_func (item->lua_function, task, NULL, - &res) && res) { + res = FALSE; + if (!rspamd_lua_call_expression_func (item->lua_function, task, NULL, + &res)) { + msg_err ("error occurred when checking symbol %s", item->symbol); + } + if (res) { rspamd_task_insert_result (task, item->symbol, 1, NULL); } }