applicationerror.java

来自「Oracle的J2EE Sample」· Java 代码 · 共 54 行

JAVA
54
字号
/*
 * @author : Umesh Kulkarni
 * @version 1.0
 *
 * Development Environment : Oracle9i JDeveloper
 *
 * Name of the File : ApplicationError.java
 *
 * Creation / Modification History
 *    Umesh           02-Aug-2002        Created
 *
 */
package oracle.otnsamples.ibfbs.usermanagement.exception;

/**
 * This Exception Class is a customized Exception Class which captures 
 * runtime generic application errors. 
 *
 * @version 1.0
 * @since 1.0
 */
public class ApplicationError extends Throwable {

  private String errorMessage;

  /**
   * Empty Constructor of this Class
   * @since 1.0
   */
  public ApplicationError() {}

  /**
   * Constructor with Error Message as parameter
   *
   * @param str Error Message
   * @since 1.0
   */
  public ApplicationError(String str) {
    super(str);
    errorMessage = str;
  }

  /**
   * Override toString() method
   * @return String representation of this error
   * @since 1.0
   **/
  public String toString() {
    return errorMessage;
  }

}

⌨️ 快捷键说明

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