summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-10-05 11:41:59 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2017-10-05 11:41:59 +0200
commit12f8efe0128ade1bd6497a59508f6bd836eb3788 (patch)
tree33ed18e8d90bcd8cdb92d9affcd4ff6145855bbc /doc
parent2262f005ce5b39ccd3694f61f2507b9e61c3804c (diff)
pandoc.lua: throw better error when pipe command fails
A table containing the error code, command, and command output is thrown instead of just a string error message.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua-filters.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index bdb56f9db..8c8268c20 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -1132,6 +1132,12 @@ Lua functions for pandoc scripts.
- Output of command.
+ Raises:
+
+ - A table containing the keys `command`, `error_code`, and
+ `output` is thrown if the command exits with a non-zero
+ error code.
+
Usage:
local output = pandoc.pipe("sed", {"-e","s/a/b/"}, "abc")