userexception.java
来自「beginJsp2.0外文书籍源代码」· Java 代码 · 共 41 行
JAVA
41 行
package com.wrox.except;
public class UserException extends Exception
{
private String userValue = "null";
public UserException()
{
}
public UserException(String msg)
{
super(msg);
}
public String getUserValue()
{
return this.userValue;
}
public void setUserValue(String userValue)
{
if (userValue == null)
this.userValue = "null";
this.userValue = userValue;
}
public String toString()
{
return (super.toString() + ": The User is " + this.getUserValue());
}
public UserException(String msg, String userValue)
{
super(msg);
setUserValue(userValue);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?