diff options
Diffstat (limited to 'lib/lace/compiler.lua')
-rw-r--r-- | lib/lace/compiler.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/lace/compiler.lua b/lib/lace/compiler.lua index 754e680..5d43547 100644 --- a/lib/lace/compiler.lua +++ b/lib/lace/compiler.lua @@ -151,6 +151,13 @@ local function compile_ruleset(ctx, src, cnt) if not ok then return nil, ret end + + if type(msg) == "table" then + -- TODO: Extract position information etc from error and + -- formulate a gorgeous multiline error message. + msg = msg.msg or "Empty error" + end + return ret, msg end |