diff options
-rw-r--r-- | lualib/lua_selectors.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lualib/lua_selectors.lua b/lualib/lua_selectors.lua index 7de1a10d8..21efc4573 100644 --- a/lualib/lua_selectors.lua +++ b/lualib/lua_selectors.lua @@ -772,6 +772,7 @@ exports.parse_selector = function(cfg, str) lua_util.debugm(M, cfg, 'processed selector %s, args: %s', res.selector.name, res.selector.args) + local it_happened = false -- Now process processors pipe fun.each(function(proc_tbl) local proc_name = proc_tbl[1] @@ -804,6 +805,7 @@ exports.parse_selector = function(cfg, str) if not transform_function[proc_name] then logger.errx(cfg, 'processor %s is unknown', proc_name) + it_happened = true return nil end local processor = lua_util.shallowcopy(transform_function[proc_name]) @@ -815,6 +817,11 @@ exports.parse_selector = function(cfg, str) end end, fun.tail(sel)) + if it_happened then + logger.errx(cfg, 'unknown processor used, exiting') + return nil + end + table.insert(output, res) end |