This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to tag REL7_3_4
in repository libpostgresql-jdbc-java.

commit 78e047b1cf67e61a216ca58792fee344b2ecd4cc
Author: Barry Lind <[email protected]>
Date:   Fri Mar 14 01:23:08 2003 +0000

    Backport batch update error message improvements to 7.3 branch
    
     Modified Files:
      Tag: REL7_3_STABLE
        jdbc/org/postgresql/errors.properties
        jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
        jdbc/org/postgresql/util/PSQLException.java
---
 org/postgresql/errors.properties                 |  2 +-
 org/postgresql/jdbc2/AbstractJdbc2Statement.java |  2 +-
 org/postgresql/util/PSQLException.java           | 11 +++++++++++
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/org/postgresql/errors.properties b/org/postgresql/errors.properties
index ca649b0..5e736e5 100644
--- a/org/postgresql/errors.properties
+++ b/org/postgresql/errors.properties
@@ -67,7 +67,7 @@ postgresql.serial.namelength:Class & Package name length 
cannot be longer than 6
 postgresql.serial.noclass:No class found for {0}
 postgresql.serial.table:The table for {0} is not in the database. Contact the 
DBA, as the database is in an inconsistent state.
 postgresql.serial.underscore:Class names may not have _ in them. You supplied 
{0}.
-postgresql.stat.batch.error:Batch entry {0} {1} was aborted.
+postgresql.stat.batch.error:Batch entry {0} {1} was aborted. Call 
getNextException() to see the cause.
 postgresql.stat.maxfieldsize:An attempt to setMaxFieldSize() failed - compile 
time default in force.
 postgresql.stat.noresult:No results were returned by the query.
 postgresql.stream.eof:The backend has broken the connection. Possibly the 
action you have attempted has caused it to close.
diff --git a/org/postgresql/jdbc2/AbstractJdbc2Statement.java 
b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
index 950375c..098ad0c 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2Statement.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
@@ -104,7 +104,7 @@ public abstract class AbstractJdbc2Statement extends 
org.postgresql.jdbc1.Abstra
 
                        PBatchUpdateException updex =
                                new 
PBatchUpdateException("postgresql.stat.batch.error",
-                                                                               
  new Integer(i), batch.elementAt(i), resultSucceeded);
+                                                                               
  new Integer(i), m_sqlFragments[0], resultSucceeded);
                        updex.setNextException(e);
 
                        throw updex;
diff --git a/org/postgresql/util/PSQLException.java 
b/org/postgresql/util/PSQLException.java
index 309306b..8dfd38e 100644
--- a/org/postgresql/util/PSQLException.java
+++ b/org/postgresql/util/PSQLException.java
@@ -2,6 +2,7 @@ package org.postgresql.util;
 
 import java.io.*;
 import java.sql.*;
+import org.postgresql.Driver;
 
 /*
  * This class extends SQLException, and provides our internationalisation 
handling
@@ -18,6 +19,8 @@ public class PSQLException extends SQLException
        {
                super();
                translate(error, null);
+               if (Driver.logDebug)
+                       Driver.debug("Exception: " + this);
        }
 
        /*
@@ -29,6 +32,8 @@ public class PSQLException extends SQLException
        {
                //super();
                translate(error, args);
+               if (Driver.logDebug)
+                       Driver.debug("Exception: " + this);
        }
 
        /*
@@ -40,6 +45,8 @@ public class PSQLException extends SQLException
                Object[] argv = new Object[1];
                argv[0] = arg;
                translate(error, argv);
+               if (Driver.logDebug)
+                       Driver.debug("Exception: " + this);
        }
 
        /*
@@ -71,6 +78,8 @@ public class PSQLException extends SQLException
                }
 
                translate(error, argv);
+               if (Driver.logDebug)
+                       Driver.debug("Exception: " + this);
        }
 
        /*
@@ -83,6 +92,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)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git

_______________________________________________
pkg-java-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to