⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkerexception.java

📁 数据库的基本处理类
💻 JAVA
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -