/** * This method is called after an exception occurred, to inform the database * event listener (if one is set). * * @param e the exception * @param sql the SQL statement */ public void exceptionThrown(SQLException e, String sql) { if (eventListener != null) { try { eventListener.exceptionThrown(e, sql); } catch (Exception e2) { // ignore this (user made) exception } } }
/** * Execute the meta data statement. * * @param db the database * @param systemSession the system session * @param listener the database event listener */ void execute(Database db, Session systemSession, DatabaseEventListener listener) { try { Prepared command = systemSession.prepare(sql); command.setObjectId(id); command.update(); } catch (DbException e) { e = e.addSQL(sql); SQLException s = e.getSQLException(); db.getTrace(Trace.DATABASE).error(s, sql); if (listener != null) { listener.exceptionThrown(s, sql); // continue startup in this case } else { throw e; } } }
public void exceptionThrown(SQLException e, String sql) { if (eventListener != null) { try { eventListener.exceptionThrown(e, sql); } catch (Exception e2) { // ignore this second (user made) exception } } }
@Override public void exceptionThrown(SQLException e, String sql) { DatabaseEventListener listener = delegateDatabaseEventListener; if(listener != null) { listener.exceptionThrown(e, sql); } }
/** * This method is called after an exception occurred, to inform the database * event listener (if one is set). * * @param e the exception * @param sql the SQL statement */ public void exceptionThrown(SQLException e, String sql) { if (eventListener != null) { try { eventListener.exceptionThrown(e, sql); } catch (Exception e2) { // ignore this (user made) exception } } }
/** * This method is called after an exception occurred, to inform the database * event listener (if one is set). * * @param e the exception * @param sql the SQL statement */ public void exceptionThrown(SQLException e, String sql) { if (eventListener != null) { try { eventListener.exceptionThrown(e, sql); } catch (Exception e2) { // ignore this (user made) exception } } }
void execute(Database db, Session systemSession, DatabaseEventListener listener) throws SQLException { try { Prepared command = systemSession.prepare(sql); command.setObjectId(id); command.setHeadPos(headPos); command.update(); } catch (Throwable e) { SQLException s = Message.addSQL(Message.convert(e), sql); db.getTrace(Trace.DATABASE).error(sql, s); if (listener != null) { listener.exceptionThrown(s, sql); // continue startup in this case } else { throw s; } } }
/** * Execute the meta data statement. * * @param db the database * @param systemSession the system session * @param listener the database event listener */ void execute(Database db, Session systemSession, DatabaseEventListener listener) { try { Prepared command = systemSession.prepare(sql); command.setObjectId(id); command.update(); } catch (DbException e) { e = e.addSQL(sql); SQLException s = e.getSQLException(); db.getTrace(Trace.DATABASE).error(s, sql); if (listener != null) { listener.exceptionThrown(s, sql); // continue startup in this case } else { throw e; } } }
/** * Execute the meta data statement. * * @param db the database * @param systemSession the system session * @param listener the database event listener */ void execute(Database db, Session systemSession, DatabaseEventListener listener) { try { Prepared command = systemSession.prepare(sql); command.setObjectId(id); command.update(); } catch (DbException e) { e = e.addSQL(sql); SQLException s = e.getSQLException(); db.getTrace(Trace.DATABASE).error(s, sql); if (listener != null) { listener.exceptionThrown(s, sql); // continue startup in this case } else { throw e; } } }