applicationexception.java
来自「Programming java 2 micro edition on symb」· Java 代码 · 共 46 行
JAVA
46 行
/*
* Copyright 2003, 2004 Symbian Ltd.
* For License terms see http://www.symbian.com/developer/techlib/codelicense.html
*/
package picturepuzzle;
/**
* An application specific Exception thrown in response to an Java exception or
* application error.
*/
public class ApplicationException extends Exception {
private Exception exception;
/**
* Creates an ApplicationException in response to an application error.
* @param message A message describing the circumstances of the error.
*/
public ApplicationException(String message) {
super(message);
}
/**
* Creates an ApplicationException in response to a Java Exception being thrown.
* @param exception The Java Exception.
* @param message A message describing the circumstance of the Exception.
*/
public ApplicationException(String message, Exception exception) {
super(message);
this.exception = exception;
}
/**
* Returns the message associated with the Java Exception.
* @return The Java Exception message.
*/
public String getExceptionType() {
if(exception != null) {
return exception.getMessage();
}else {
return null;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?