From c6ce06a6d800dd5c5772a024998690ac952fffe6 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 4 Mar 2006 16:07:12 +0000 Subject: [PATCH] (server-process-filter): Handle errors during evaluation of the argument. --- lisp/ChangeLog | 5 +++++ lisp/server.el | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 61808a4c423..57fb4486ee0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-03-04 Andreas Schwab + + * server.el (server-process-filter): Handle errors during + evaluation of the argument. + 2006-03-03 John Paul Wallington * t-mouse.el (t-mouse-drag-start, t-mouse-swap-alt-keys): Doc fix; diff --git a/lisp/server.el b/lisp/server.el index 4d461876e30..befcd22ad3a 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -343,10 +343,14 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"." (if coding-system (setq arg (decode-coding-string arg coding-system))) (if eval - (let ((v (eval (car (read-from-string arg))))) + (let* (errorp + (v (condition-case errobj + (eval (car (read-from-string arg))) + (error (setq errorp t) errobj)))) (when v (with-temp-buffer (let ((standard-output (current-buffer))) + (if errorp (princ "error: ")) (pp v) ;; Suppress the error rose when the pipe to PROC is closed. (condition-case err -- 2.39.2