需要简单,但是作为一个新手来说,觉得挺实用的
public class ParamException extends Exception{
private static final long serialVersionUID = 3941133113562944154L;
private static final String fmt = "%s error!";
public static ParamException getWsParamException(String paramName){
return new ParamException(String.format(fmt, String.valueOf(paramName)));
}
public ParamException(String msg){
super(msg);
}
}