當前位置: 首頁>>代碼示例>>Java>>正文


Java ExceptionListener類代碼示例

本文整理匯總了Java中com.sleepycat.je.ExceptionListener的典型用法代碼示例。如果您正苦於以下問題:Java ExceptionListener類的具體用法?Java ExceptionListener怎麽用?Java ExceptionListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ExceptionListener類屬於com.sleepycat.je包,在下文中一共展示了ExceptionListener類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: notifyExceptionListener

import com.sleepycat.je.ExceptionListener; //導入依賴的package包/類
private void notifyExceptionListener(Exception e) {
    if (envImpl == null) {
        return;
    }
    final ExceptionListener listener = envImpl.getExceptionListener();
    if (listener == null) {
        return;
    }
    listener.exceptionThrown(DbInternal.makeExceptionEvent(e, name));
}
 
開發者ID:prat0318,項目名稱:dbms,代碼行數:11,代碼來源:DaemonThread.java

示例2: getExceptionListener

import com.sleepycat.je.ExceptionListener; //導入依賴的package包/類
public ExceptionListener getExceptionListener() {
return exceptionListener;
   }
 
開發者ID:nologic,項目名稱:nabs,代碼行數:4,代碼來源:EnvironmentImpl.java

示例3: getExceptionListener

import com.sleepycat.je.ExceptionListener; //導入依賴的package包/類
public ExceptionListener getExceptionListener() {
    return exceptionListener;
}
 
開發者ID:prat0318,項目名稱:dbms,代碼行數:4,代碼來源:EnvironmentImpl.java

示例4: uncaughtException

import com.sleepycat.je.ExceptionListener; //導入依賴的package包/類
/**
 * When an uncaught exception occurs, log it, publish it to the
 * exception handler, and invalidate the environment.
 */
public void uncaughtException(Thread t, Throwable e) {
    Logger useLogger = getLogger();
    if (useLogger != null) {
        String envName = (envImpl == null)? "" : envImpl.getName();
        String message = envName + ":" + t.getName() +
            " exited unexpectedly with exception " + e;
        if (e != null) {
            message += LoggerUtils.getStackTrace(e);
        }

        if (envImpl != null) {
            /*
             * If we have an environment, log this to all three
             * handlers.
             */
            LoggerUtils.severe(useLogger, envImpl, message);
        } else {
            /*
             * We don't have an environment, but at least log this
             * to the console.
             */
            useLogger.log(Level.SEVERE, message);
        }
    }


    if (envImpl == null) {
        return;
    }

    final ExceptionListener exceptionListener =
        envImpl.getExceptionListener();
    if ((exceptionListener != null) && (e instanceof Exception)) {
        exceptionListener.exceptionThrown
            (DbInternal.makeExceptionEvent((Exception) e,
                                           t.getName()));
    }

    /*
     * If not already invalid, invalidate environment by creating an
     * EnvironmentFailureException.
     */
    if (envImpl.isValid()) {

        /*
         * Create the exception to invalidate the environment, but do
         * not throw it since the handle is invoked in some internal
         * JVM thread and the exception is not meaningful to the
         * invoker.
         */
        new EnvironmentFailureException
            (envImpl, EnvironmentFailureReason.UNCAUGHT_EXCEPTION, e);
    }
}
 
開發者ID:prat0318,項目名稱:dbms,代碼行數:59,代碼來源:StoppableThread.java

示例5: setExceptionListener

import com.sleepycat.je.ExceptionListener; //導入依賴的package包/類
public void setExceptionListener(ExceptionListener exceptionListener) {

	this.exceptionListener = exceptionListener;
    }
 
開發者ID:nologic,項目名稱:nabs,代碼行數:5,代碼來源:EnvironmentImpl.java


注:本文中的com.sleepycat.je.ExceptionListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。