diff options
author | Peter Mount <peter@retep.org.uk> | 1999-05-18 23:17:46 +0000 |
---|---|---|
committer | Peter Mount <peter@retep.org.uk> | 1999-05-18 23:17:46 +0000 |
commit | 4c63b257fd90e28a043197fd2abc07f2166f8eb3 (patch) | |
tree | c7e1108fc1dae813c2df536d5475fc6058293519 /src/interfaces/jdbc/postgresql/jdbc1/PreparedStatement.java | |
parent | c2f0d565f319f7a75f0178758e9270c96d0c807f (diff) |
Internationalisation of error messages
Diffstat (limited to 'src/interfaces/jdbc/postgresql/jdbc1/PreparedStatement.java')
-rw-r--r-- | src/interfaces/jdbc/postgresql/jdbc1/PreparedStatement.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/interfaces/jdbc/postgresql/jdbc1/PreparedStatement.java b/src/interfaces/jdbc/postgresql/jdbc1/PreparedStatement.java index f56ca20cc11..69bb426624b 100644 --- a/src/interfaces/jdbc/postgresql/jdbc1/PreparedStatement.java +++ b/src/interfaces/jdbc/postgresql/jdbc1/PreparedStatement.java @@ -93,7 +93,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta for (i = 0 ; i < inStrings.length ; ++i) { if (inStrings[i] == null) - throw new SQLException("No value specified for parameter " + (i + 1)); + throw new PSQLException("postgresql.prep.param",new Integer(i + 1)); s.append (templateStrings[i]); s.append (inStrings[i]); } @@ -118,7 +118,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta for (i = 0 ; i < inStrings.length ; ++i) { if (inStrings[i] == null) - throw new SQLException("No value specified for parameter " + (i + 1)); + throw new PSQLException("postgresql.prep.param",new Integer(i + 1)); s.append (templateStrings[i]); s.append (inStrings[i]); } @@ -411,7 +411,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta */ public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException { - throw new SQLException("InputStream as parameter not supported"); + throw postgresql.Driver.notImplemented(); } /** @@ -486,7 +486,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta setString(parameterIndex, ((PGobject)x).getValue()); break; default: - throw new SQLException("Unknown Types value"); + throw new PSQLException("postgresql.prep.type"); } } @@ -550,7 +550,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta for (i = 0 ; i < inStrings.length ; ++i) { if (inStrings[i] == null) - throw new SQLException("No value specified for parameter " + (i + 1)); + throw new PSQLException("postgresql.prep.param",new Integer(i + 1)); s.append (templateStrings[i]); s.append (inStrings[i]); } @@ -594,7 +594,7 @@ public class PreparedStatement extends Statement implements java.sql.PreparedSta private void set(int paramIndex, String s) throws SQLException { if (paramIndex < 1 || paramIndex > inStrings.length) - throw new SQLException("Parameter index out of range"); + throw new PSQLException("postgresql.prep.range"); inStrings[paramIndex - 1] = s; } } |