| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.util.logging.ErrorManager
public class ErrorManager
可将 ErrorManager 对象附加到 Handler,以便处理日志记录过程中 Handler 上所发生的错误。
在处理日志记录输出时,如果 Handler 遇到问题,则 Handler 应该调用其相关的 ErrorManager,而不是抛出异常以返回到日志记录调用的发出方(其可能对此不感兴趣)。
| 字段摘要 | |
|---|---|
| static int | CLOSE_FAILURECLOSE_FAILURE 用于对输出流的关闭失败时。 | 
| static int | FLUSH_FAILUREFLUSH_FAILURE 用于对输出流的刷新失败时。 | 
| static int | FORMAT_FAILUREFORMAT_FAILURE 用于因任何格式化问题导致的失败 。 | 
| static int | GENERIC_FAILUREGENERIC_FAILURE 用于不属于其他任何一类的失败。 | 
| static int | OPEN_FAILUREOPEN_FAILURE 用于对输出流的打开失败时。 | 
| static int | WRITE_FAILUREWRITE_FAILURE 用于对输出流的写入失败时。 | 
| 构造方法摘要 | |
|---|---|
| ErrorManager() | |
| 方法摘要 | |
|---|---|
|  void | error(String msg,
      Exception ex,
      int code)在发生 Handler 失败时调用 error 方法。 | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| 字段详细信息 | 
|---|
public static final int GENERIC_FAILURE
public static final int WRITE_FAILURE
public static final int FLUSH_FAILURE
public static final int CLOSE_FAILURE
public static final int OPEN_FAILURE
public static final int FORMAT_FAILURE
| 构造方法详细信息 | 
|---|
public ErrorManager()
| 方法详细信息 | 
|---|
public void error(String msg,
                  Exception ex,
                  int code)
可在子类中重写此方法。此基类中的默认行为是将第一个调用报告给 System.err,忽略随后的调用。
msg - 描述性的字符串(可能为 null)。ex - 异常(可能为 null)。code - ErrorManager 中所定义的错误代码。| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。