[armedbear-cvs] r12320 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Fri Jan 1 15:38:40 UTC 2010


Author: ehuelsmann
Date: Fri Jan  1 10:38:33 2010
New Revision: 12320

Log:
Print StreamErrors with a readable text,
  even when created based on a Throwable.

Modified:
   trunk/abcl/src/org/armedbear/lisp/StreamError.java

Modified: trunk/abcl/src/org/armedbear/lisp/StreamError.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/StreamError.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/StreamError.java	Fri Jan  1 10:38:33 2010
@@ -105,6 +105,8 @@
     {
         super(StandardClass.STREAM_ERROR);
         setStream(stream != null ? stream : NIL);
+        setFormatControl(cause.getMessage());
+        setFormatArguments(NIL);
         this.cause = cause;
     }
 
@@ -158,8 +160,8 @@
         @Override
         public LispObject execute(LispObject arg)
         {
-            if (arg instanceof StreamError) 
-                return ((StreamError)arg).getStream();                
+            if (arg instanceof StreamError)
+                return ((StreamError)arg).getStream();
             return error(new TypeError(arg, Symbol.STREAM_ERROR));
         }
     };




More information about the armedbear-cvs mailing list