datatypeexception.java

来自「linux下建立JAVA虚拟机的源码KAFFE」· Java 代码 · 共 40 行

JAVA
40
字号
package org.relaxng.datatype;

/**
 * Signals Datatype related exceptions.
 * 
 * @author <a href="mailto:jjc@jclark.com">James Clark</a>
 * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
 */
public class DatatypeException extends Exception {
	
	public DatatypeException( int index, String msg ) {
		super(msg);
		this.index = index;
	}
	public DatatypeException( String msg ) {
		this(UNKNOWN,msg);
	}
	/**
	 * A constructor for those datatype libraries which don't support any
	 * diagnostic information at all.
	 */
	public DatatypeException() {
		this(UNKNOWN,null);
	}
	
	
	private final int index;
	
	public static final int UNKNOWN = -1;

	/**
	 * Gets the index of the content where the error occured.
	 * UNKNOWN can be returned to indicate that no index information
	 * is available.
	 */
	public int getIndex() {
		return index;
	}
}

⌨️ 快捷键说明

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