db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r1496870 - /db/derby/code/trunk/java/demo/workingwithderby/WwdEmbedded.java
Date Wed, 26 Jun 2013 10:16:17 GMT
Author: dyre
Date: Wed Jun 26 10:16:17 2013
New Revision: 1496870

URL: http://svn.apache.org/r1496870
Log:
DERBY-1997: Remove custom exception printing methods and replace with printStackTrace as suggested

Modified:
    db/derby/code/trunk/java/demo/workingwithderby/WwdEmbedded.java

Modified: db/derby/code/trunk/java/demo/workingwithderby/WwdEmbedded.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/workingwithderby/WwdEmbedded.java?rev=1496870&r1=1496869&r2=1496870&view=diff
==============================================================================
--- db/derby/code/trunk/java/demo/workingwithderby/WwdEmbedded.java (original)
+++ db/derby/code/trunk/java/demo/workingwithderby/WwdEmbedded.java Wed Jun 26 10:16:17 2013
@@ -143,32 +143,8 @@ public class WwdEmbedded
             /*       Catch all exceptions and pass them to 
             **       the exception reporting method             */
             System.out.println(" . . . exception thrown:");
-            errorPrint(e);
+            e.printStackTrace(System.out);
          }
          System.out.println("Getting Started With Derby JDBC program ending.");
       }
-     //   ## DERBY EXCEPTION REPORTING CLASSES  ## 
-    /***     Exception reporting methods
-    **      with special handling of SQLExceptions
-    ***/
-      static void errorPrint(Throwable e) {
-         if (e instanceof SQLException) 
-            SQLExceptionPrint((SQLException)e);
-         else {
-            System.out.println("A non SQL error occured.");
-            e.printStackTrace();
-         }   
-      }  // END errorPrint 
-
-    //  Iterates through a stack of SQLExceptions 
-      static void SQLExceptionPrint(SQLException sqle) {
-         while (sqle != null) {
-            System.out.println("\n---SQLException Caught---\n");
-            System.out.println("SQLState:   " + (sqle).getSQLState());
-            System.out.println("Severity: " + (sqle).getErrorCode());
-            System.out.println("Message:  " + (sqle).getMessage()); 
-            sqle.printStackTrace();  
-            sqle = sqle.getNextException();
-         }
-   }  //  END SQLExceptionPrint   	
 }



Mime
View raw message