Subject RE: [Firebird-Java] SQLException
Author Ken Richard
Here are the minimum changes for the error handling to introduce the
FBSQLException class. All it does right now is let the user call
getErrorCode() to get the native firebird error code (which is all I
needed it to do for today). I can work on the rest later.

Diff of existing modules:

cvs server: Diffing client-java
cvs server: Diffing client-java/bin
cvs server: Diffing client-java/lib
cvs server: Diffing client-java/src
cvs server: Diffing client-java/src/build
cvs server: Diffing client-java/src/etc
cvs server: Diffing client-java/src/jdbcTest
cvs server: Diffing client-java/src/jdbcTest/callableStatement
cvs server: Diffing client-java/src/jdbcTest/connection
cvs server: Diffing client-java/src/jdbcTest/data
cvs server: Diffing client-java/src/jdbcTest/dbmetadata
cvs server: Diffing client-java/src/jdbcTest/example
cvs server: Diffing client-java/src/jdbcTest/harness
cvs server: Diffing client-java/src/jdbcTest/preparedStatement
cvs server: Diffing client-java/src/jdbcTest/resultSet
cvs server: Diffing client-java/src/jdbcTest/rsmetadata
cvs server: Diffing client-java/src/jdbcTest/statement
cvs server: Diffing client-java/src/jdbcTestResources
cvs server: Diffing client-java/src/jdbcTestResources/firebird-resources
cvs server: Diffing client-java/src/lib
cvs server: Diffing client-java/src/org
cvs server: Diffing client-java/src/org/firebirdsql
cvs server: Diffing client-java/src/org/firebirdsql/gds
Index: client-java/src/org/firebirdsql/gds/
RCS file:
retrieving revision 1.6
diff -r1.6
> public int getIntParam() {
> return intParam;
> }
cvs server: Diffing client-java/src/org/firebirdsql/jca
cvs server: Diffing client-java/src/org/firebirdsql/jdbc
Index: client-java/src/org/firebirdsql/jdbc/
RCS file:
retrieving revision 1.19
diff -r1.19
< throw new SQLException("GDSException: " + ge);
> throw new FBSQLException(ge);
< throw new SQLException("GDS exception: " + ge.toString());
> throw new FBSQLException(ge);
Index: client-java/src/org/firebirdsql/jdbc/
RCS file:
retrieving revision 1.17
diff -r1.17
< throw new SQLException("GDSException: " + ge);
> throw new FBSQLException(ge);
< throw new SQLException("GDSException: " + ge);
> throw new FBSQLException(ge);
< throw new SQLException("GDSException: " + ge);
> throw new FBSQLException(ge);
cvs server: Diffing client-java/src/org/firebirdsql/jgds
cvs server: Diffing client-java/src/org/firebirdsql/logging
cvs server: Diffing client-java/src/org/firebirdsql/management
cvs server: Diffing client-java/src/resources
cvs server: cannot find client-java/src/resources/
cvs server: Diffing client-java/src/resources/META-INF
cvs server: Diffing client-java/src/stylesheets

New Module:
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at
* Alternatively, the contents of this file may be used under the
* terms of the GNU Lesser General Public License Version 2 or later
* "LGPL"), in which case the provisions of the GPL are applicable
* instead of those above. You may obtain a copy of the Licence at
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* relevant License for more details.
* This file was created by members of the firebird development team.
* All individual contributions remain the Copyright (C) of those
* individuals. Contributors to this file are either listed here or
* can be obtained from a CVS history command.
* All rights reserved.
package org.firebirdsql.jdbc;

// imports --------------------------------------
import java.sql.SQLException;
import org.firebirdsql.gds.GDSException;

*@author Ken Richard
*@created May 30, 2002
*@see <related>
*@version $ $

public class FBSQLException extends SQLException {

GDSException original = null;

public FBSQLException(GDSException ex) {
super("GDS Exception: " + ex);
original = ex;

public int getErrorCode() {
return original.getIntParam();

public Exception getInternalException() {
return original;