]> granicus.if.org Git - postgresql/commitdiff
Applied patch by Oliver Jowett to clean up some exception handling
authorBarry Lind <barry@xythos.com>
Mon, 11 Aug 2003 21:18:47 +0000 (21:18 +0000)
committerBarry Lind <barry@xythos.com>
Mon, 11 Aug 2003 21:18:47 +0000 (21:18 +0000)
 Modified Files:
  jdbc/org/postgresql/core/QueryExecutor.java
  jdbc/org/postgresql/util/PSQLException.java

src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java
src/interfaces/jdbc/org/postgresql/util/PSQLException.java

index 5b030e75e69282d698fcde49da44e2a76c8d9cb0..122497676d26aa1bb6e2ceb861807406ef74eeb1 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright (c) 2003, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/core/Attic/QueryExecutor.java,v 1.22 2003/05/29 03:21:32 barry Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/core/Attic/QueryExecutor.java,v 1.23 2003/08/11 21:18:47 barry Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -192,7 +192,7 @@ public class QueryExecutor
 
                        // did we get an error during this query?
                        if ( errorMessage != null )
-                               throw new SQLException( errorMessage.toString() );
+                               throw new SQLException( errorMessage.toString().trim() );
 
 
                        //if an existing result set was passed in reuse it, else
@@ -283,7 +283,7 @@ public class QueryExecutor
 
                        // did we get an error during this query?
                        if ( errorMessage != null )
-                               throw new SQLException( errorMessage.toString() );
+                               throw new SQLException( errorMessage.toString().trim() );
 
 
                        //if an existing result set was passed in reuse it, else
index f043fded085fc2257337a13068defdad04c4eff9..84ccc60ca2c845c2e299ad7acdcc6869a4cc95e1 100644 (file)
@@ -7,7 +7,7 @@
  * Copyright (c) 2003, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/util/Attic/PSQLException.java,v 1.11 2003/03/14 01:21:47 barry Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/util/Attic/PSQLException.java,v 1.12 2003/08/11 21:18:47 barry Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -127,12 +127,4 @@ public class PSQLException extends SQLException
        {
                return message;
        }
-
-       /*
-        * Overides Object
-        */
-       public String toString()
-       {
-               return message != null ? message : "";
-       }
 }