Mercurial > emacs
changeset 69276:8c9110e3c96e
(server-process-filter): Handle errors during
evaluation of the argument.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Sat, 04 Mar 2006 16:06:46 +0000 |
parents | 09b58f24f398 |
children | ffbb561abb59 |
files | lisp/server.el |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/server.el Fri Mar 03 23:55:18 2006 +0000 +++ b/lisp/server.el Sat Mar 04 16:06:46 2006 +0000 @@ -343,10 +343,14 @@ (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