checkerexception.java
来自「数据库的基本处理类」· Java 代码 · 共 61 行
JAVA
61 行
package com.neu.wrm.common;
import java.util.Iterator;
import java.util.List;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessage;
/*
* Created on 2005-4-6
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
/**
* @author zhuqiangfeng
* need to implement get the cause key,error is pass in,without key
*/
public class CheckerException extends Exception {
private ActionErrors errors;
private String key;
/**
* @return Returns the errors.
*/
public ActionErrors getErrors() {
return errors;
}
/**
* @param errors The errors to set.
*/
public void setErrors(ActionErrors errors) {
this.errors = errors;
}
/**
* @return Returns the key.
*/
public String getKey() {
return key;
}
/**
* @param key The key to set.
*/
public void setKey(String key) {
this.key = key;
}
/**
* @param errors
*/
public CheckerException(ActionErrors errors) {
this.errors=errors;
Iterator it=errors.get();
if(it.hasNext()){
ActionMessage error=(ActionMessage) it.next();
String key=error.getKey();
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?