From 12f8efe0128ade1bd6497a59508f6bd836eb3788 Mon Sep 17 00:00:00 2001
From: Albert Krewinkel <albert@zeitkraut.de>
Date: Thu, 5 Oct 2017 11:41:59 +0200
Subject: 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.
---
 doc/lua-filters.md | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'doc')

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")
-- 
cgit v1.2.3