loggingsaferunnable.java

来自「eclipseme的最新版本的source,欢迎j2me程序员使用」· Java 代码 · 共 36 行

JAVA
36
字号
/**
 * Copyright (c) 2003-2005 Craig Setera
 * All Rights Reserved.
 * Licensed under the Eclipse Public License - v 1.0
 * For more information see http://www.eclipse.org/legal/epl-v10.html
 */
package eclipseme.core.internal.utils;

import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.IStatus;

import eclipseme.core.internal.EclipseMECorePlugin;

/**
 * Simple implementation of the ISafeRunnable interface that logs
 * any exceptions that occur.
 * <p />
 * Copyright (c) 2003-2005 Craig Setera<br>
 * All Rights Reserved.<br>
 * Licensed under the Eclipse Public License - v 1.0<p/>
 * <br>
 * $Revision: 1.3 $
 * <br>
 * $Date: 2005/07/07 02:37:16 $
 * <br>
 * @author Craig Setera
 */
public abstract class LoggingSafeRunnable implements ISafeRunnable {
	/**
	 * @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable)
	 */
	public void handleException(Throwable exception) {
		EclipseMECorePlugin.log(IStatus.WARNING, "Exception occurred invoking runnable", exception);
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?