From 15f737f4ffe5802a4c55805ef5a052172dc5f826 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 22 Jun 2012 04:59:45 -0500 Subject: [PATCH] Propagate non-zero exit codes as errors --- async.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/async.el b/async.el index b7825c7b1..8b942b49a 100644 --- a/async.el +++ b/async.el @@ -111,10 +111,11 @@ as follows: (backward-sexp) (async-handle-result async-callback (read (current-buffer)) (current-buffer))) - (set (make-local-variable 'async-callback-value) 'error) - (set (make-local-variable 'async-callback-value-set) t) - (error "Async process '%s' failed with exit code %d" - (process-name proc) (process-exit-status proc))))))) + (set (make-local-variable 'async-callback-value) + (list 'error + (format "Async process '%s' failed with exit code %d" + (process-name proc) (process-exit-status proc)))) + (set (make-local-variable 'async-callback-value-set) t)))))) (defun async--receive-sexp (&optional stream) (let ((sexp (base64-decode-string (read stream)))) -- 2.39.2