JDBC Fix a few SQLException error messages

Поиск
Список
Период
Сортировка
Искать

JDBC Fix a few SQLException error messages

От:
Fernando Nasser <fnasser@redhat.com>
Дата:
The way these messages were being formed they would never be found in 
the properties file.  I had to fix the message to include a placeholder 
for the parameter and change the cal to pass the parameter instead of 
concatenating it to the key.


-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9
Index: src/interfaces/jdbc/org/postgresql/errors.properties
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/errors.properties,v
retrieving revision 1.15
diff -c -p -r1.15 errors.properties
*** src/interfaces/jdbc/org/postgresql/errors.properties	2002/11/14 05:35:45	1.15
--- src/interfaces/jdbc/org/postgresql/errors.properties	2002/11/25 15:44:56
*************** postgresql.updateable.beforestartdelete:
*** 83,89 ****
  postgresql.updateable.afterlastdelete:After end of result set. Can not call deleteRow().
  postgresql.updateable.notoninsertrow:Not on insert row.
  postgresql.updateable.inputstream:Input Stream is null.
! postgresql.updateable.ioerror:Input Stream Error.
  postgresql.call.noreturntype:A CallableStatement Function was declared but no call to 'registerOutParameter (1, )' was made.
  postgresql.call.noinout:PostgreSQL only supports function return value [@ 1] (no OUT or INOUT arguments)
  postgresql.call.procasfunc:This Statement [{0}] defines a procedure call (needs ?= call  to be considered a function.
--- 83,89 ----
  postgresql.updateable.afterlastdelete:After end of result set. Can not call deleteRow().
  postgresql.updateable.notoninsertrow:Not on insert row.
  postgresql.updateable.inputstream:Input Stream is null.
! postgresql.updateable.ioerror:Input Stream Error - {0}
  postgresql.call.noreturntype:A CallableStatement Function was declared but no call to 'registerOutParameter (1, )' was made.
  postgresql.call.noinout:PostgreSQL only supports function return value [@ 1] (no OUT or INOUT arguments)
  postgresql.call.procasfunc:This Statement [{0}] defines a procedure call (needs ?= call  to be considered a function.
Index: src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java,v
retrieving revision 1.10
diff -c -p -r1.10 AbstractJdbc2ResultSet.java
*** src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java	2002/11/04 06:42:33	1.10
--- src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java	2002/11/25 15:44:58
*************** public abstract class AbstractJdbc2Resul
*** 750,756 ****
  		}
  		catch (IOException ie)
  		{
! 			throw new PSQLException("postgresql.updateable.ioerror" + ie);
  		}
  
  		updateValue(columnIndex, theData);
--- 750,756 ----
  		}
  		catch (IOException ie)
  		{
! 			throw new PSQLException("postgresql.updateable.ioerror", ie);
  		}
  
  		updateValue(columnIndex, theData);
*************** public abstract class AbstractJdbc2Resul
*** 784,790 ****
  		}
  		catch (IOException ie)
  		{
! 			throw new PSQLException("postgresql.updateable.ioerror" + ie);
  		}
  		updateValue(columnIndex, theData);
  
--- 784,790 ----
  		}
  		catch (IOException ie)
  		{
! 			throw new PSQLException("postgresql.updateable.ioerror", ie);
  		}
  		updateValue(columnIndex, theData);
  
*************** public abstract class AbstractJdbc2Resul
*** 832,838 ****
  		}
  		catch (IOException ie)
  		{
! 			throw new PSQLException("postgresql.updateable.ioerror" + ie);
  		}
  		updateValue(columnIndex, theData);
  	}
--- 832,838 ----
  		}
  		catch (IOException ie)
  		{
! 			throw new PSQLException("postgresql.updateable.ioerror", ie);
  		}
  		updateValue(columnIndex, theData);
  	}
FAQ