OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [classpath/] [external/] [relaxngDatatype/] [org/] [relaxng/] [datatype/] [DatatypeException.java] - Blame information for rev 768

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 768 jeremybenn
package org.relaxng.datatype;
2
 
3
/**
4
 * Signals Datatype related exceptions.
5
 *
6
 * @author <a href="mailto:jjc@jclark.com">James Clark</a>
7
 * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
8
 */
9
public class DatatypeException extends Exception {
10
 
11
        public DatatypeException( int index, String msg ) {
12
                super(msg);
13
                this.index = index;
14
        }
15
        public DatatypeException( String msg ) {
16
                this(UNKNOWN,msg);
17
        }
18
        /**
19
         * A constructor for those datatype libraries which don't support any
20
         * diagnostic information at all.
21
         */
22
        public DatatypeException() {
23
                this(UNKNOWN,null);
24
        }
25
 
26
 
27
        private final int index;
28
 
29
        public static final int UNKNOWN = -1;
30
 
31
        /**
32
         * Gets the index of the content where the error occured.
33
         * UNKNOWN can be returned to indicate that no index information
34
         * is available.
35
         */
36
        public int getIndex() {
37
                return index;
38
        }
39
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.