Fixed Internationalization of error messages.

This commit is contained in:
Peter Mount 1999-05-17 22:58:19 +00:00
parent 3f59cc0831
commit 20f0cfc322
4 changed files with 18 additions and 9 deletions

View File

@ -1,3 +1,7 @@
Tue May 18 00:00:00 BST 1999
- Just after committing, I realised why internationalisation isn't
working. This is now fixed (in the Makefile).
Mon May 17 23:40:00 BST 1999
- PG_Stream.close() now attempts to send the close connection message
to the backend before closing the streams

View File

@ -4,7 +4,7 @@
# Makefile for Java JDBC interface
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/Makefile,v 1.12 1999/01/25 21:22:02 scrappy Exp $
# $Header: /cvsroot/pgsql/src/interfaces/jdbc/Attic/Makefile,v 1.13 1999/05/17 22:58:18 peter Exp $
#
#-------------------------------------------------------------------------
@ -69,6 +69,8 @@ OBJ_COMMON= postgresql/Connection.class \
postgresql/Field.class \
postgresql/PG_Stream.class \
postgresql/ResultSet.class \
postgresql/errors.properties \
postgresql/errors_fr.properties \
postgresql/fastpath/Fastpath.class \
postgresql/fastpath/FastpathArg.class \
postgresql/geometric/PGbox.class \
@ -83,6 +85,7 @@ OBJ_COMMON= postgresql/Connection.class \
postgresql/util/PGmoney.class \
postgresql/util/PGobject.class \
postgresql/util/PGtokenizer.class \
postgresql/util/PSQLException.class \
postgresql/util/Serialize.class \
postgresql/util/UnixCrypt.class
@ -140,7 +143,8 @@ jdbc2: $(OBJ_COMMON) $(OBJ_JDBC2) postgresql.jar
# directory. We use this later for compiling the dual-mode driver.
#
postgresql.jar: $(OBJ) $(OBJ_COMMON)
$(JAR) -c0f $@ $$($(FIND) postgresql -name "*.class" -print)
$(JAR) -c0f $@ $$($(FIND) postgresql -name "*.class" -print) \
$(wildcard postgresql/*.properties)
# This rule removes any temporary and compiled files from the source tree.
clean:

View File

@ -48,6 +48,7 @@ public class basic
st.close();
db.close();
//throw postgresql.Driver.notImplemented();
}
/**

View File

@ -8,7 +8,7 @@ import java.util.*;
// working quite to plan, so the class exists in the source, but it's not
// quite implemented yet. Peter May 17 1999.
//
//import postgresql.util.PSQLException;
import postgresql.util.PSQLException;
/**
* The Java SQL framework allows for multiple database drivers. Each
@ -108,11 +108,11 @@ public class Driver implements java.sql.Driver
con.openConnection (host(), port(), props, database(), url, this);
return (java.sql.Connection)con;
} catch(ClassNotFoundException ex) {
//throw new PSQLException("postgresql.jvm.version",ex);
throw new SQLException("The postgresql.jar file does not contain the correct JDBC classes for this JVM. Try rebuilding.\nException thrown was "+ex.toString());
throw new PSQLException("postgresql.jvm.version",ex);
//throw new SQLException("The postgresql.jar file does not contain the correct JDBC classes for this JVM. Try rebuilding.\nException thrown was "+ex.toString());
} catch(Exception ex2) {
//throw new PSQLException("postgresql.unusual",ex2);
throw new SQLException("Something unusual has occured to cause the driver to fail. Please report this exception: "+ex2.toString());
throw new PSQLException("postgresql.unusual",ex2);
//throw new SQLException("Something unusual has occured to cause the driver to fail. Please report this exception: "+ex2.toString());
}
// The old call - remove before posting
//return new Connection (host(), port(), props, database(), url, this);
@ -355,8 +355,8 @@ public class Driver implements java.sql.Driver
*/
public static SQLException notImplemented()
{
//return new PSQLException("postgresql.unimplemented");
return new SQLException("This method is not yet implemented.");
return new PSQLException("postgresql.unimplemented");
//return new SQLException("This method is not yet implemented.");
}
}