From 45fb7d18cac903e5950261113c0c3e4c2624a9df Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 11 Nov 2014 17:36:03 +0000 Subject: [PATCH] Be more informative about lua errors. --- src/plugins/regexp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index f22a1503f..d1f456a9f 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); } } -- 2.39.5