} catch (Exception e) {  throw new FBSQLException(e);
} catch(InvocationTargetException ex) {  Throwable t = ex.getTargetException(); if (t instanceof FBSQLException) throw (FBSQLException)t; else throw new UndeclaredThrowableException(t);  } catch (IllegalArgumentException e) { throw new UndeclaredThrowableException(e); } catch (InstantiationException e) { throw new UndeclaredThrowableException(e); } catch (IllegalAccessException e) { throw new UndeclaredThrowableException(e); } catch (NoSuchMethodException e) { throw new UndeclaredThrowableException(e);
    public static AbstractPreparedStatement createPreparedStatement(GDSHelper gdsHelper,            String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability,            StatementListener statementListener, BlobListener blobListener, boolean metadata)            throws FBSQLException {        try {                        Constructor constructor = ClassFactory.get(ClassFactory.FBPreparedStatement)                    .getConstructor(                            new Class[] { GDSHelper.class, String.class, int.class, int.class,                                    int.class, StatementListener.class, BlobListener.class,                                    boolean.class });            return (AbstractPreparedStatement) constructor.newInstance(new Object[] { gdsHelper,                    sql, new Integer(resultSetType), new Integer(resultSetConcurrency),                    new Integer(resultSetHoldability), statementListener, blobListener,                    new Boolean(metadata) });        } catch (Exception e) {            throw new FBSQLException(e);        }    }