[Ecls-list] si:safe-eval bug

Alessandro Serra gas.hale at gmail.com
Fri Oct 30 14:54:01 UTC 2009


Hi,
current:
|   (defun safe-eval (form env &optional (err-value nil err-value-p))
|   ...
|         (if err-value-p
|             (let ((*break-enable* nil))
|               (si::eval-with-env form env))
|             (handler-bind ((serious-condition #'invoke-debugger))
|               (setf output (si::eval-with-env form env)
|                     ok t)))
|      (return-from safe-eval (if ok output err-value)))))

with err-value setted it returns always err-value because ok is never setted.
Fixed (it seem to be):

|   (defun safe-eval (form env &optional (err-value nil err-value-p))
|     ...
|         (if err-value-p
|             (let ((*break-enable* nil))
|               (setf output (si::eval-with-env form env)
|                      ok t))
|             (handler-bind ((serious-condition #'invoke-debugger))
|              (setf output (si::eval-with-env form env)
|                     ok t)))
|      (return-from safe-eval (if ok output err-value)))))

Gas

-- 
The basic tool for the manipulation of reality is the manipulation of
words. If you can control the meaning of words, you can control the
people who must use the words.
                   How To Build A Universe That Doesn't Fall Apart Two
Days Later
                   Philip K. Dick




More information about the ecl-devel mailing list