[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scl:ignore-errors behavior in 7.2
In article <1991Nov1.111401.7765@cs.uoregon.edu> you write:
>Does not seem to return multiple values in case of no error;
>and if there is an error, the second value is T, not the
>error condition.
>
>Is there a way I can achieve this functionality (short of
>rel 8).
My first instinct is to ask why you are using ignore-errors if you
don't actually want to ignore errors? (Come to think of it, why is
ignore-errors in the language at all? Seems like it's so trivial to
implement it's not even worth it.) But anyway, something like this
should work:
(defmacro my-ignore-errors (&body body)
`(condition-case (e)
(values (progn ,@body))
((error)
(values nil e))))
I don't have a lispm to try this on, so I might've made a typo or
something.
--
Carl L. Gay cgay@ns.uoregon.edu Home: (503) 345-1918
663 Van Buren St., Eugene, OR 97402 Work: (503) 346-1759