aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarry Lind <barry@xythos.com>2003-08-11 21:18:47 +0000
committerBarry Lind <barry@xythos.com>2003-08-11 21:18:47 +0000
commit1ca4e700deaf8ce9a1b4c07c97bec4f58c4611b1 (patch)
tree00a38376bd43618bc634cae11f67bb66ed6b7df7 /src
parentd7c609f7c4de9cdab1d2bd92964273d4cb34067f (diff)
downloadpostgresql-1ca4e700deaf8ce9a1b4c07c97bec4f58c4611b1.tar.gz
postgresql-1ca4e700deaf8ce9a1b4c07c97bec4f58c4611b1.zip
Applied patch by Oliver Jowett to clean up some exception handling
Modified Files: jdbc/org/postgresql/core/QueryExecutor.java jdbc/org/postgresql/util/PSQLException.java
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java6
-rw-r--r--src/interfaces/jdbc/org/postgresql/util/PSQLException.java10
2 files changed, 4 insertions, 12 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java b/src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java
index 5b030e75e69..122497676d2 100644
--- a/src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java
+++ b/src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java
@@ -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
diff --git a/src/interfaces/jdbc/org/postgresql/util/PSQLException.java b/src/interfaces/jdbc/org/postgresql/util/PSQLException.java
index f043fded085..84ccc60ca2c 100644
--- a/src/interfaces/jdbc/org/postgresql/util/PSQLException.java
+++ b/src/interfaces/jdbc/org/postgresql/util/PSQLException.java
@@ -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 : "";
- }
}