[libpostgresql-jdbc-java] 12/19: add missing SQLState by Patrick Higgins
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:19:08 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to tag REL7_4_1
in repository libpostgresql-jdbc-java.
commit bf57d6b50c54a36f22a2bc530728be6d7f992af3
Author: Dave Cramer <davec at fastcrypt.com>
Date: Fri Dec 12 18:39:01 2003 +0000
add missing SQLState by Patrick Higgins
---
org/postgresql/jdbc1/AbstractJdbc1Statement.java | 2 +-
org/postgresql/util/PSQLException.java | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/org/postgresql/jdbc1/AbstractJdbc1Statement.java b/org/postgresql/jdbc1/AbstractJdbc1Statement.java
index 0350267..6f19d6e 100644
--- a/org/postgresql/jdbc1/AbstractJdbc1Statement.java
+++ b/org/postgresql/jdbc1/AbstractJdbc1Statement.java
@@ -526,7 +526,7 @@ public abstract class AbstractJdbc1Statement implements BaseStatement
callResult = result.getObject(1);
int columnType = result.getMetaData().getColumnType(1);
if (columnType != functionReturnType)
- throw new PSQLException ("postgresql.call.wrongrtntype",
+ throw new PSQLException ("postgresql.call.wrongrtntype", PSQLState.DATA_TYPE_MISMATCH,
new Object[]{
"java.sql.Types=" + columnType, "java.sql.Types=" + functionReturnType });
result.close ();
diff --git a/org/postgresql/util/PSQLException.java b/org/postgresql/util/PSQLException.java
index 22394ed..19b06d2 100644
--- a/org/postgresql/util/PSQLException.java
+++ b/org/postgresql/util/PSQLException.java
@@ -224,6 +224,8 @@ public class PSQLException extends SQLException
public String getSQLState()
{
+ if (state == null)
+ return PSQLState.UNKNOWN_STATE.getState();
return state.getState();
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git
More information about the pkg-java-commits
mailing list