From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:aacc::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id sPq0Iv4qdmGzRAAAsNZ9tg (envelope-from ); Mon, 25 Oct 2021 03:56:46 +0000 Received: from out2.migadu.com ([2001:41d0:2:aacc::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aLaGHv4qdmGtCwAAB5/wlQ (envelope-from ); Mon, 25 Oct 2021 03:56:46 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1635134206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rw3l+X4Dz8BgNMQ0wtrADVCWThpEHIOT5Kr8h5FWZxo=; b=isMrYKWKyGWoh2qgGdnaEvcysXloA5qfsLb9kTgTuagNsDHZdQnbTYiCUQPczvDGB1iKvc qtg5flbMO3Az/DQLVyCQ7YhmyDecNwMErlvv+ytu1I1kSsbblTKwrBwufkwlgsc7y6T4eC CDjdxhC0w1tD/nGZ5xT/3zEkhxKnKxfEPU7/bpJOPPs9o4yGzzLXxn6D6C3xwsMXrjyA6m I9vuTEaN6nKlJaC2kWxJK8hfhZrRvvEI9jq9P9YRb0Rx8u0GRWEasSHA+sdwl1DGxHTKKF bAYpgR0SXR3hondgftb47qoE47bGGM8d9sTGEuwSJC+HXksJVMqZqFS6cpg5VA== From: Kyle Meyer To: piem@inbox.kyleam.com Subject: [PATCH 05/10] piem-lei-insert-output: Signal an error if lei call fails Date: Sun, 24 Oct 2021 23:56:25 -0400 Message-Id: <20211025035630.297598-6-kyle@kyleam.com> In-Reply-To: <20211025035630.297598-1-kyle@kyleam.com> References: <20211025035630.297598-1-kyle@kyleam.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kyle@kyleam.com X-TUID: TFvy1YC60pXB None of the current calls to lei should have a non-zero exit, even when they come up empty. --- piem-lei.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/piem-lei.el b/piem-lei.el index 5f381173..f3b16b65 100644 --- a/piem-lei.el +++ b/piem-lei.el @@ -43,8 +43,10 @@ (defcustom piem-lei-lei-executable "lei" (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 -- 2.33.1