[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JDK 1.2



Etienne,

I have another minor request for SableCC. At times it has "crashed"
with an exception due to bugs in kaffe. Unfortunately, the way SableCC.java
is written, the only diagnostics from this is that it prints a "null",
because it's trying to print the empty e.getMessage(). It would be
helpful if it would show the whole exception with stack trace.

So could you add the patch below (or equivalent) in the next release?

Thanks,
-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

--- SableCC.java	Sat Jul 18 21:43:30 1998
+++ SableCC.java.new	Tue Dec 15 19:00:21 1998
@@ -181,7 +181,8 @@
             }
             catch(Exception e)
             {
-                System.out.println(e.getMessage());
+                System.out.println(e);
+		e.printStackTrace(System.out);
             }
 
             try
@@ -191,17 +192,20 @@
             }
             catch(Exception e)
             {
-                System.out.println(e.getMessage());
+                System.out.println(e);
+		e.printStackTrace(System.out);
             }
         }
         catch(Exception e)
         {
-            System.out.println(e);
+            System.out.println("Caught exception: " + e);
+	    e.printStackTrace(System.out);
             System.exit(1);
         }
         catch(Throwable e)
         {
-            System.out.println(e);
+            System.out.println("Caught error: " + e);
+	    e.printStackTrace(System.out);
             System.exit(1);
         }
         finally