Tabnine Logo
DatabaseEventListener.exceptionThrown
Code IndexAdd Tabnine to your IDE (free)

How to use
exceptionThrown
method
in
org.h2.api.DatabaseEventListener

Best Java code snippets using org.h2.api.DatabaseEventListener.exceptionThrown (Showing top 9 results out of 315)

origin: com.h2database/h2

/**
 * 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
    }
  }
}
origin: com.h2database/h2

/**
 * 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;
    }
  }
}
origin: com.h2database/com.springsource.org.h2

public void exceptionThrown(SQLException e, String sql) {
  if (eventListener != null) {
    try {
      eventListener.exceptionThrown(e, sql);
    } catch (Exception e2) {
      // ignore this second (user made) exception
    }
  }
}
origin: orbisgis/orbisgis

@Override
public void exceptionThrown(SQLException e, String sql) {
  DatabaseEventListener listener = delegateDatabaseEventListener;
  if(listener != null) {
    listener.exceptionThrown(e, sql);
  }
}
origin: com.eventsourcing/h2

/**
 * 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
    }
  }
}
origin: org.wowtools/h2

/**
 * 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
    }
  }
}
origin: com.h2database/com.springsource.org.h2

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;
    }
  }
}
origin: org.wowtools/h2

/**
 * 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;
    }
  }
}
origin: com.eventsourcing/h2

/**
 * 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;
    }
  }
}
org.h2.apiDatabaseEventListenerexceptionThrown

Javadoc

This method is called if an exception occurred.

Popular methods of DatabaseEventListener

  • closingDatabase
    This method is called before the database is closed normally. It is save to connect to the database
  • init
    This method is called just after creating the object. This is done when opening the database if the
  • opened
    This method is called after the database has been opened. It is save to connect to the database and
  • setProgress
    This method is called for long running events, such as recovering, scanning a file or building an in
  • diskSpaceIsLow
    This method is called if the disk space is very low. One strategy is to inform the user and wait for

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • getResourceAsStream (ClassLoader)
  • onCreateOptionsMenu (Activity)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now