📄 tellerexception.java
字号:
//定义本类在包examples.cluster.ejb.teller 中
package examples.cluster.ejb.teller;
/**
* 这是用户定义的异常类
*/
//用户定义的异常类必须继承Exception
public class TellerException extends Exception {
/**
* 获取没有字符串参数的异常
*
*/
public TellerException() {}
/**
* 用特定的字符串构造异常
*
* @参数 message Exception 消息
*/
public TellerException(String message) {super(message);}
/**
* 用特定的异常构造异常
*
* @参数 e Exception
*/
public TellerException(Exception e) {super(e.getMessage());}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -