postgresql-jdbc.git / summary / log / commit / refs
commit 25de3fbcd7e82b4abf76e21b92144e7e53bfbcaa
Author: Dave Cramer <davec@fastcrypt.com>
Date: Mon May 30 13:52:12 2005 +0000
fixed up error messages
org/postgresql/core/types/PGBoolean.java | 3 ++-
org/postgresql/core/types/PGByte.java | 3 ++-
org/postgresql/core/types/PGDouble.java | 3 ++-
org/postgresql/core/types/PGFloat.java | 3 ++-
org/postgresql/core/types/PGInteger.java | 3 ++-
org/postgresql/core/types/PGLong.java | 3 ++-
org/postgresql/core/types/PGNumber.java | 3 ++-
org/postgresql/core/types/PGShort.java | 3 ++-
org/postgresql/core/types/PGString.java | 3 ++-
9 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/org/postgresql/core/types/PGBoolean.java b/org/postgresql/core/types/PGBoolean.java
index efce0170..89f9c2b1 100644
--- a/org/postgresql/core/types/PGBoolean.java
+++ b/org/postgresql/core/types/PGBoolean.java
@@ -8,6 +8,7 @@ package org.postgresql.core.types;
import java.sql.Types;
+import org.postgresql.util.GT;
import org.postgresql.util.PSQLException;
import org.postgresql.util.PSQLState;
@@ -57,7 +58,7 @@ public class PGBoolean implements PGType
}
catch(Exception ex)
{
- throw new PSQLException("Error", new PSQLState(""),ex);
+ throw new PSQLException(GT.tr("Cannot convert an instance of {0} to type {1}", new Object[]{val.getClass().getName(),"Types.OTHER"}), PSQLState.INVALID_PARAMETER_TYPE, ex);
}
}
public String toString()
diff --git a/org/postgresql/core/types/PGByte.java b/org/postgresql/core/types/PGByte.java
index 3c4756b7..5cf0df91 100644
--- a/org/postgresql/core/types/PGByte.java
+++ b/org/postgresql/core/types/PGByte.java
@@ -9,6 +9,7 @@ package org.postgresql.core.types;
import java.math.BigDecimal;
import java.sql.Types;
+import org.postgresql.util.GT;
import org.postgresql.util.PSQLException;
import org.postgresql.util.PSQLState;
@@ -59,7 +60,7 @@ public class PGByte implements PGType
}
catch( Exception ex )
{
- throw new PSQLException("Error", new PSQLState(""),ex);
+ throw new PSQLException(GT.tr("Cannot convert an instance of {0} to type {1}", new Object[]{val.getClass().getName(),"Types.OTHER"}), PSQLState.INVALID_PARAMETER_TYPE, ex);
}
}
diff --git a/org/postgresql/core/types/PGDouble.java b/org/postgresql/core/types/PGDouble.java
index 79622aa3..35f1ab0b 100644
--- a/org/postgresql/core/types/PGDouble.java
+++ b/org/postgresql/core/types/PGDouble.java
@@ -9,6 +9,7 @@ package org.postgresql.core.types;
import java.math.BigDecimal;
import java.sql.Types;
+import org.postgresql.util.GT;
import org.postgresql.util.PSQLException;
import org.postgresql.util.PSQLState;
@@ -60,7 +61,7 @@ public class PGDouble implements PGType
}
catch( Exception ex )
{
- throw new PSQLException("Error", new PSQLState(""),ex);
+ throw new PSQLException(GT.tr("Cannot convert an instance of {0} to type {1}", new Object[]{val.getClass().getName(),"Types.OTHER"}), PSQLState.INVALID_PARAMETER_TYPE, ex);
}
}
public String toString()
diff --git a/org/postgresql/core/types/PGFloat.java b/org/postgresql/core/types/PGFloat.java
index 59b39c7c..3f455d89 100644
--- a/org/postgresql/core/types/PGFloat.java
+++ b/org/postgresql/core/types/PGFloat.java
@@ -9,6 +9,7 @@ package org.postgresql.core.types;
import java.math.BigDecimal;
import java.sql.Types;
+import org.postgresql.util.GT;
import org.postgresql.util.PSQLException;
import org.postgresql.util.PSQLState;
@@ -60,7 +61,7 @@ public class PGFloat implements PGType
}
catch( Exception ex)
{
- throw new PSQLException("Error", new PSQLState(""),ex);
+ throw new PSQLException(GT.tr("Cannot convert an instance of {0} to type {1}", new Object[]{val.getClass().getName(),"Types.OTHER"}), PSQLState.INVALID_PARAMETER_TYPE, ex);
}
}
public String toString()
diff --git a/org/postgresql/core/types/PGInteger.java b/org/postgresql/core/types/PGInteger.java
index f3bfb1b6..e93f987b 100644
--- a/org/postgresql/core/types/PGInteger.java
+++ b/org/postgresql/core/types/PGInteger.java
@@ -9,6 +9,7 @@ package org.postgresql.core.types;
import java.math.BigDecimal;
import java.sql.Types;
+import org.postgresql.util.GT;
import org.postgresql.util.PSQLException;
import org.postgresql.util.PSQLState;
@@ -57,7 +58,7 @@ public class PGInteger implements PGType
}
catch( Exception ex )
{
- throw new PSQLException("Error", new PSQLState(""),ex);
+ throw new PSQLException(GT.tr("Cannot convert an instance of {0} to type {1}", new Object[]{val.getClass().getName(),"Types.OTHER"}), PSQLState.INVALID_PARAMETER_TYPE, ex);
}
}
public String toString()
diff --git a/org/postgresql/core/types/PGLong.java b/org/postgresql/core/types/PGLong.java
index 0a5f5bab..79b0791e 100644
--- a/org/postgresql/core/types/PGLong.java
+++ b/org/postgresql/core/types/PGLong.java
@@ -8,6 +8,7 @@ package org.postgresql.core.types;
import java.math.BigDecimal;
import java.sql.Types;
+import org.postgresql.util.GT;
import org.postgresql.util.PSQLException;
import org.postgresql.util.PSQLState;
@@ -58,7 +59,7 @@ public class PGLong implements PGType
}
catch( Exception ex )
{
- throw new PSQLException("Error", new PSQLState(""),ex);
+ throw new PSQLException(GT.tr("Cannot convert an instance of {0} to type {1}", new Object[]{val.getClass().getName(),"Types.OTHER"}), PSQLState.INVALID_PARAMETER_TYPE, ex);
}
}
public String toString()
diff --git a/org/postgresql/core/types/PGNumber.java b/org/postgresql/core/types/PGNumber.java
index af46c4cc..a2beae74 100644
--- a/org/postgresql/core/types/PGNumber.java
+++ b/org/postgresql/core/types/PGNumber.java
@@ -8,6 +8,7 @@ package org.postgresql.core.types;
import java.sql.Types;
+import org.postgresql.util.GT;
import org.postgresql.util.PSQLException;
import org.postgresql.util.PSQLState;
@@ -58,7 +59,7 @@ public class PGNumber implements PGType
}
catch( Exception ex )
{
- throw new PSQLException("Error", new PSQLState(""),ex);
+ throw new PSQLException(GT.tr("Cannot convert an instance of {0} to type {1}", new Object[]{val.getClass().getName(),"Types.OTHER"}), PSQLState.INVALID_PARAMETER_TYPE, ex);
}
}
public String toString()
diff --git a/org/postgresql/core/types/PGShort.java b/org/postgresql/core/types/PGShort.java
index 78f7a983..85ff93b6 100644
--- a/org/postgresql/core/types/PGShort.java
+++ b/org/postgresql/core/types/PGShort.java
@@ -9,6 +9,7 @@ package org.postgresql.core.types;
import java.math.BigDecimal;
import java.sql.Types;
+import org.postgresql.util.GT;
import org.postgresql.util.PSQLException;
import org.postgresql.util.PSQLState;
@@ -54,7 +55,7 @@ public class PGShort implements PGType
}
catch (Exception ex)
{
- throw new PSQLException("Error", new PSQLState(""),ex);
+ throw new PSQLException(GT.tr("Cannot convert an instance of {0} to type {1}", new Object[]{val.getClass().getName(),"Types.OTHER"}), PSQLState.INVALID_PARAMETER_TYPE, ex);
}
}
diff --git a/org/postgresql/core/types/PGString.java b/org/postgresql/core/types/PGString.java
index 76290aa3..fe734689 100644
--- a/org/postgresql/core/types/PGString.java
+++ b/org/postgresql/core/types/PGString.java
@@ -9,6 +9,7 @@ package org.postgresql.core.types;
import java.math.BigDecimal;
import java.sql.Types;
+import org.postgresql.util.GT;
import org.postgresql.util.PSQLException;
import org.postgresql.util.PSQLState;
@@ -69,7 +70,7 @@ public class PGString implements PGType
}
catch( Exception ex )
{
- throw new PSQLException("Error", new PSQLState(""),ex);
+ throw new PSQLException(GT.tr("Cannot convert an instance of {0} to type {1}", new Object[]{val.getClass().getName(),"Types.OTHER"}), PSQLState.INVALID_PARAMETER_TYPE, ex);
}
}
public String toString()
[parent: 95ae884b6019]