From 4c63b257fd90e28a043197fd2abc07f2166f8eb3 Mon Sep 17 00:00:00 2001 From: Peter Mount Date: Tue, 18 May 1999 23:17:46 +0000 Subject: Internationalisation of error messages --- src/interfaces/jdbc/postgresql/jdbc1/Statement.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/interfaces/jdbc/postgresql/jdbc1/Statement.java') diff --git a/src/interfaces/jdbc/postgresql/jdbc1/Statement.java b/src/interfaces/jdbc/postgresql/jdbc1/Statement.java index 4bc026331b9..0f458acec75 100644 --- a/src/interfaces/jdbc/postgresql/jdbc1/Statement.java +++ b/src/interfaces/jdbc/postgresql/jdbc1/Statement.java @@ -7,6 +7,8 @@ package postgresql.jdbc1; import java.sql.*; +import postgresql.util.PSQLException; + /** * A Statement object is used for executing a static SQL statement and * obtaining the results produced by it. @@ -52,7 +54,7 @@ public class Statement implements java.sql.Statement while (result != null && !((postgresql.ResultSet)result).reallyResultSet()) result = ((postgresql.ResultSet)result).getNext(); if (result == null) - throw new SQLException("no results returned"); + throw new PSQLException("postgresql.stat.noresult"); return result; } @@ -69,7 +71,7 @@ public class Statement implements java.sql.Statement { this.execute(sql); if (((postgresql.ResultSet)result).reallyResultSet()) - throw new SQLException("results returned"); + throw new PSQLException("postgresql.stat.result"); return this.getUpdateCount(); } @@ -114,7 +116,7 @@ public class Statement implements java.sql.Statement */ public void setMaxFieldSize(int max) throws SQLException { - throw new SQLException("Attempt to setMaxFieldSize failed - compile time default"); + throw new PSQLException("postgresql.stat.maxfieldsize"); } /** -- cgit v1.2.3