From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.help Subject: Throwing error if process started with call-process returns error exit code Date: Thu, 19 Jul 2018 13:39:55 -0400 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1532021914 26907 195.159.176.226 (19 Jul 2018 17:38:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2018 17:38:34 +0000 (UTC) To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 19 19:38:30 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fgCsm-0006s5-89 for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Jul 2018 19:38:28 +0200 Original-Received: from localhost ([::1]:44415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgCut-0008GU-7e for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Jul 2018 13:40:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgCuP-0008GO-OM for help-gnu-emacs@gnu.org; Thu, 19 Jul 2018 13:40:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgCuO-0002n1-SU for help-gnu-emacs@gnu.org; Thu, 19 Jul 2018 13:40:09 -0400 Original-Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:46761) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fgCuO-0002mb-IY for help-gnu-emacs@gnu.org; Thu, 19 Jul 2018 13:40:08 -0400 Original-Received: by mail-lj1-x230.google.com with SMTP id 203-v6so8658569ljj.13 for ; Thu, 19 Jul 2018 10:40:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=uHrWd0yR6ohfnLPYmXMWRas1siS3Ij0gDkLgqQ0/XV4=; b=DrykvniwALXflvGpeRvLHYYKjPKtBbMcgzNRpzoXazwfH6T8gHr//j69bgFo5gKGSZ lIv3pholu/mDMHPF3NUpBM1GjQVZS3mWBCsD/MIhE/LgHIBvjxJZveb+JHjDTphiLSbR 9g+I3h/MCAjwbPF/3dKGaTGW+rIpDpI5cUADXaKjDKLmxzljTCkfu4ux7NGfxBEp4Wkz wPeHfJAyYvBy2RT81DCPoqIp/l7AtPb+zA3Mt0HFA62KAZWlzFB8RzI34LFwasvK/y0c dXK7PXIgJqh9lfZP1Lh8PoAokDMf/iPftlaE6LIIv+TjJaXp/qoBh/3JCC32FKdanFEh 6hhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=uHrWd0yR6ohfnLPYmXMWRas1siS3Ij0gDkLgqQ0/XV4=; b=VV88DegB/DvTOFkROoKVIbweL/ZvixDLkjz9Qdand5NUojP/g75QHOx7LQLG6/miSz dnHjdmtmWdmW4iLlxqK32woEsVVi/40e81uDcCKZpEUlbV19yPB8M71LntKDZT25yMTE GFINQ8hgOLw9cJjOOknt/7kpLFwkE/BIqDuvwjHyLfobP0wVRPCIQl2p/GsIAcn5Vo+h vR2IMuS7gM4hSJsyZ0kHCPlrV0B6pW3IG38WsMLe5aP5HkrkO1Iok1Fkty8xqtu7EcK3 nv6s532v4BD1EDGS10VmWU5C8URpRS2WM3WgochZ4dCtLs+bSbHDsQnVtuY80Q9Zp+B8 s5SA== X-Gm-Message-State: AOUpUlH/qA8FZEWVgRrrA5sH/6B0Fs7G1VDU+IgyusbHWKQJiDfz7GHi sknN9NKGLZQI/CL3znSruR9WPAzxeybU6joWPmJxWpUj X-Google-Smtp-Source: AAOMgpcnRr/TDRMOUL9zN0zfmAEukQImK3cEotemyEAz5a/I2nQW+zpcujpYW7TzDdyFlNJZ6/QyIVMfJXh3gquBFns= X-Received: by 2002:a2e:1c6:: with SMTP id f67-v6mr8213006lji.88.1532022006735; Thu, 19 Jul 2018 10:40:06 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::230 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117499 Archived-At: 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