diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2015-11-26 15:42:19 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2015-11-27 17:46:53 +0000 |
commit | 004b1b907d18b6cc0fe949f35c02dddeb9906c9d (patch) | |
tree | 45b352e8d441ce5158e194937bc2e3f62f867deb | |
parent | fd4450a59d1fb8c8e1c119449ad5e76213cd4ad2 (diff) | |
download | lace-004b1b907d18b6cc0fe949f35c02dddeb9906c9d.tar.gz |
lace.builtin.include: Record subwords for include errors
This adds the file path as the error word in include statements,
so if an error happens in a file that has been included,
the include statement is included in the chain.
-rw-r--r-- | lib/lace/builtin.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/lace/builtin.lua b/lib/lace/builtin.lua index 7577610..9d53455 100644 --- a/lib/lace/builtin.lua +++ b/lib/lace/builtin.lua @@ -308,6 +308,9 @@ local function _do_include(exec_context, ruleset, conds) local result, msg = engine.internal_run(ruleset, exec_context) if result == "" then return true + elseif result == nil then + msg.words = {err.subwords(msg, 2)} + return nil, msg end return result, msg end |