exceptionconfig.java

来自「J2EE eclipse 下开发数据库一个插件」· Java 代码 · 共 46 行

JAVA
46
字号
/*
 * Created on 2003-4-16
 *
 */
package com.tanghan.util.config;

import java.util.HashMap;

import org.w3c.dom.Element;
import com.tanghan.util.XMLUtility;

/**
 * 处理ExceptionConfig的Config实现类
 * @author Jerry Tang
 * @version v0.1.0
 * @copyright  (C) 2003 Tanghan工作组
 *
 */
public class ExceptionConfig extends ConfigSupport {

	/* (non-Javadoc)
	 * @see com.tanghan.util.config.Config#dealConfigInfo(java.util.HashMap, org.w3c.dom.Element)
	 */
	public void dealConfigInfo(HashMap properties, Element rootElement) {
		super.dealConfigInfo(properties, rootElement);
		if(properties==null||rootElement==null)
			return;
		try{
			String errorCodeRes = XMLUtility.getNodeAttr(rootElement,"ExceptionConfig","errorCodesRes");
			if(errorCodeRes==null)
				return;
			properties.put("ErrorCodes.Resource",errorCodeRes);
		}catch(Exception e){
			log.error("Load ExceptionConfig时报错",e);
		}				
	}

	/* (non-Javadoc)
	 * @see com.tanghan.util.config.Config#getRootName()
	 */
	public String getRootName() {
		return "";
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?