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] - Rev 768

Compare with Previous | Blame | View Log

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;
        }
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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