API Overview API Index Package Overview Direct link to this page
JDK 1.6
  org.relaxng.datatype. DatatypeException View Javadoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

font color='#880088'>
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;
	}
}

Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar