# Class DatatypeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.relaxng.datatype.DatatypeException

All Implemented Interfaces:
  `Serializable`

public class DatatypeException extends Exception
Signals Datatype related exceptions.

Author:
  James Clark, Kohsuke KAWAGUCHI
See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `UNKNOWN`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DatatypeException()`
  A constructor for those datatype libraries which don't support any diagnostic information at all.
  `DatatypeException(int index, String msg)`
  `DatatypeException(String msg)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getIndex()`
  Gets the index of the content where the error occurred.

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### UNKNOWN

    public static final int UNKNOWN
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### DatatypeException

    public DatatypeException(int index, String msg)

  - ### DatatypeException

    public DatatypeException(String msg)

  - ### DatatypeException

    public DatatypeException()
    A constructor for those datatype libraries which don't support any diagnostic information at all.

- ## Method Details

  - ### getIndex

    public int getIndex()
    Gets the index of the content where the error occurred. UNKNOWN can be returned to indicate that no index information is available.