help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Throwing error if process started with call-process returns error exit c


From: Kaushal Modi
Subject: Throwing error if process started with call-process returns error exit code
Date: Thu, 19 Jul 2018 13:39:55 -0400

Hello,

What's the canonical way to check if the process initiated using
call-process failed?

>From the signature of this function:

  (call-process PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS)

, I can manually parse the buffer I set as DESTINATION and look for errors
like "Unknown option" etc.. but that would be too specific to the process I
am running.

So I was wondering if there's a wrapper function I can use readily, or
something that simply tells me if the process passed or failed.

In case of error, I'd like that parent Elisp function to stop further
execution and throw a user-error.
-- 

Kaushal Modi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]