From 98c4afa82ed818fddaafa659eaafebc51f92d3a0 Mon Sep 17 00:00:00 2001 From: Undecidable Robot Date: Thu, 2 Jun 2016 01:27:36 +0800 Subject: Moving error to a higher level --- relabel.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/relabel.lua b/relabel.lua index 6fdbb7c..003a0d2 100644 --- a/relabel.lua +++ b/relabel.lua @@ -378,7 +378,7 @@ local function compile (p, defs) if type(cp) == "string" then cp = cp:gsub("^[^:]+:[^:]+: ", "") end - error(cp) + error(cp, 3) end if #syntaxerrs > 0 then local lines = splitlines(p) @@ -390,7 +390,7 @@ local function compile (p, defs) tinsert(errors, rep(" ", col-1) .. "^") end syntaxerrs = {} - error("syntax error(s) in pattern\n" .. concat(errors, "\n")) + error("syntax error(s) in pattern\n" .. concat(errors, "\n"), 3) end return cp end -- cgit v1.2.3-55-g6feb