diff options
author | Barry Lind <barry@xythos.com> | 2003-03-14 01:21:47 +0000 |
---|---|---|
committer | Barry Lind <barry@xythos.com> | 2003-03-14 01:21:47 +0000 |
commit | 77ce53580bbf1e08ee943e13b997b4d4c17928cf (patch) | |
tree | 631bd18516f2f553eb5fcf65f9340d844e532aa6 /src/interfaces/jdbc/org/postgresql/util/PSQLException.java | |
parent | 7931bfa764d114ed64cc24bbeb3876206f2e2ec4 (diff) | |
download | postgresql-77ce53580bbf1e08ee943e13b997b4d4c17928cf.tar.gz |
Improved error message and added some log messages in batch update functionality
Modified Files:
jdbc/org/postgresql/errors.properties
jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
jdbc/org/postgresql/util/PSQLException.java
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/util/PSQLException.java')
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/util/PSQLException.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/util/PSQLException.java b/src/interfaces/jdbc/org/postgresql/util/PSQLException.java index 3dbf257302..f043fded08 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.10 2003/03/08 06:06:55 barry Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/util/Attic/PSQLException.java,v 1.11 2003/03/14 01:21:47 barry Exp $ * *------------------------------------------------------------------------- */ @@ -16,6 +16,7 @@ package org.postgresql.util; import java.io.ByteArrayOutputStream; import java.io.PrintWriter; import java.sql.SQLException; +import org.postgresql.Driver; public class PSQLException extends SQLException { @@ -29,6 +30,8 @@ public class PSQLException extends SQLException { super(); translate(error, null); + if (Driver.logDebug) + Driver.debug("Exception: " + this); } /* @@ -40,6 +43,8 @@ public class PSQLException extends SQLException { super(); translate(error, args); + if (Driver.logDebug) + Driver.debug("Exception: " + this); } /* @@ -51,6 +56,8 @@ public class PSQLException extends SQLException Object[] argv = new Object[1]; argv[0] = arg; translate(error, argv); + if (Driver.logDebug) + Driver.debug("Exception: " + this); } /* @@ -82,6 +89,8 @@ public class PSQLException extends SQLException } translate(error, argv); + if (Driver.logDebug) + Driver.debug("Exception: " + this); } /* @@ -94,6 +103,8 @@ public class PSQLException extends SQLException argv[0] = arg1; argv[1] = arg2; translate(error, argv); + if (Driver.logDebug) + Driver.debug("Exception: " + this); } private void translate(String error, Object[] args) |