Carl Taylor <carltaylor@att.net> wrote:
+---------------
| CL-USER 1 >
| (handler-case (/ 123 0)
| (error (condition)
| (format *error-output* "~2%~6T~S~#%" condition)
| nil))
|
|
| #<DIVISION-BY-ZERO 200BB04B>
| NIL
+---------------
One usually wants "~A" here instead of "~S", since "~S" usually
just prints the unreadable object, while "~A" ("aesthetic format")
often prints much more useful information, e.g.:
> (handler-case (/ 123 0)
(error (condition)
(format *error-output* "~&~A~%" condition)))
Arithmetic error DIVISION-BY-ZERO signalled.
Operation was KERNEL::DIVISION, operands (123 0).
NIL
>
Of course, how much more depends on the implementation, but...
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607