diff options
author | Andreas Schwab <schwab@suse.de> | 2006-03-04 16:07:12 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2006-03-04 16:07:12 +0000 |
commit | c6ce06a6d800dd5c5772a024998690ac952fffe6 (patch) | |
tree | e979a3b874e7a37d1b897d612cb14e10fc279eda /lisp/server.el | |
parent | da92726901b0a73ada40c386c01f95fd1723e97e (diff) | |
download | emacs-c6ce06a6d800dd5c5772a024998690ac952fffe6.tar.gz emacs-c6ce06a6d800dd5c5772a024998690ac952fffe6.tar.bz2 emacs-c6ce06a6d800dd5c5772a024998690ac952fffe6.zip |
(server-process-filter): Handle errors during
evaluation of the argument.
Diffstat (limited to 'lisp/server.el')
-rw-r--r-- | lisp/server.el | 6 |
1 files changed, 5 insertions, 1 deletions
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 |