⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filehandlerexception.java

📁 LuceneInAction配套源码,LuceneInAction是对lucene api的详细讲解及具体应用.此源码即应用例子
💻 JAVA
字号:
package lia.handlingtypes.framework;import java.io.PrintStream;import java.io.PrintWriter;public class FileHandlerException extends Exception {  private Throwable cause;  /**   * Default constructor.   */  public FileHandlerException() {    super();  }  /**   * Constructs with message.   */  public FileHandlerException(String message) {    super(message);  }  /**   * Constructs with chained exception.   */  public FileHandlerException(Throwable cause) {    super(cause.toString());    this.cause = cause;  }  /**   * Constructs with message and exception.   */  public FileHandlerException(String message, Throwable cause) {    super(message, cause);  }  /**   * Retrieves nested exception.   */  public Throwable getException() {    return cause;  }  public void printStackTrace() {    printStackTrace(System.err);  }  public void printStackTrace(PrintStream ps) {    synchronized (ps) {      super.printStackTrace(ps);      if (cause != null) {        ps.println("--- Nested Exception ---");        cause.printStackTrace(ps);      }    }  }  public void printStackTrace(PrintWriter pw) {    synchronized (pw) {      super.printStackTrace(pw);      if (cause != null) {        pw.println("--- Nested Exception ---");        cause.printStackTrace(pw);      }    }  }}

⌨️ 快捷键说明

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