当前位置: 首页>>代码示例>>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;未经允许,请勿转载。