diff options
author | Kyle Meyer <kyle@kyleam.com> | 2021-10-24 23:56:25 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2021-10-25 22:49:56 -0400 |
commit | 417f658e754cf2a49658ad86e90c9f299eae544e (patch) | |
tree | 9f63a69a4f8670dfb8ae1e323ea5737a1d31ace1 | |
parent | 3c912d7f563a397c39701a640e11a419557e15b4 (diff) | |
download | piem-417f658e754cf2a49658ad86e90c9f299eae544e.tar.gz |
piem-lei-insert-output: Signal an error if lei call fails
None of the current calls to lei should have a non-zero exit, even
when they come up empty.
Message-Id: <20211025035630.297598-6-kyle@kyleam.com>
-rw-r--r-- | piem-lei.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/piem-lei.el b/piem-lei.el index 5f38117..f3b16b6 100644 --- a/piem-lei.el +++ b/piem-lei.el @@ -43,8 +43,10 @@ (defun piem-lei-insert-output (args &optional buffer) "Call lei with ARGS and insert standard output in BUFFER. If BUFFER is nil, the current buffer is used." - (apply #'call-process piem-lei-lei-executable nil - (list (or buffer t) nil) nil args)) + (unless (= 0 (apply #'call-process piem-lei-lei-executable nil + (list (or buffer t) nil) nil args)) + ;; TODO: Add debugging option for capturing stderr. + (error "Calling %s with %S failed" piem-lei-lei-executable args))) ;;;; Message display |