From 417f658e754cf2a49658ad86e90c9f299eae544e Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 24 Oct 2021 23:56:25 -0400 Subject: 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> --- piem-lei.el | 6 ++++-- 1 file 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 -- cgit v1.2.3