# HG changeset patch # User Andreas Schwab # Date 1141488406 0 # Node ID 8c9110e3c96ebf5beca2cb918cc573228f08ab70 # Parent 09b58f24f3980606f480ea621f6a59bd01b0893d (server-process-filter): Handle errors during evaluation of the argument. diff -r 09b58f24f398 -r 8c9110e3c96e lisp/server.el --- 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