1 package org.relaxng.datatype;
\r
4 * Signals Datatype related exceptions.
\r
6 * @author <a href="mailto:jjc@jclark.com">James Clark</a>
\r
7 * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
\r
9 public class DatatypeException extends Exception {
\r
11 public DatatypeException( int index, String msg ) {
\r
15 public DatatypeException( String msg ) {
\r
19 * A constructor for those datatype libraries which don't support any
\r
20 * diagnostic information at all.
\r
22 public DatatypeException() {
\r
27 private final int index;
\r
29 public static final int UNKNOWN = -1;
\r
32 * Gets the index of the content where the error occured.
\r
33 * UNKNOWN can be returned to indicate that no index information
\r
36 public int getIndex() {
\r