## org.apache.xerces.dom
Class DOMErrorImpl

    java.lang.Object
      |
      +--org.apache.xerces.dom.DOMErrorImpl

All Implemented Interfaces:
  org.w3c.dom.DOMError

public class DOMErrorImpl
extends java.lang.Object
implements org.w3c.dom.DOMError

`DOMErrorImpl` is an implementation that describes an error. Note: The error object that describes the error might be reused by Xerces implementation, across multiple calls to the handleEvent method on DOMErrorHandler interface.

See also the Document Object Model (DOM) Level 3 Core Specification.

# INTERNAL:

  Usage of this class is not supported. It may be altered or removed at any time.

Version:
  $Id: DOMErrorImpl.java 699892 2008-09-28 21:08:27Z mrglavas $
Author:
  Gopal Sharma, SUN Microsystems Inc., Elena Litani, IBM

Field Summary
`java.lang.Exception` `fException`
`DOMLocatorImpl` `fLocator`
`java.lang.String` `fMessage`
`java.lang.Object` `fRelatedData`
`short` `fSeverity`
`java.lang.String` `fType`

Fields inherited from interface org.w3c.dom.DOMError
`SEVERITY_ERROR, SEVERITY_FATAL_ERROR, SEVERITY_WARNING`

Constructor Summary
`DOMErrorImpl()` Default constructor.
`DOMErrorImpl(short severity, org.apache.xerces.xni.parser.XMLParseException exception)` Exctracts information from XMLParserException)

Method Summary
`org.w3c.dom.DOMLocator` `getLocation()` The location of the error.
`java.lang.String` `getMessage()` An implementation specific string describing the error that occured.
`java.lang.Object` `getRelatedData()` The related `DOMError.type` dependent data if any.
`java.lang.Object` `getRelatedException()` The related platform dependent exception if any.exception is a reserved word, we need to rename it.Change to "relatedException".
`short` `getSeverity()` The severity of the error, either `SEVERITY_WARNING`, `SEVERITY_ERROR`, or `SEVERITY_FATAL_ERROR`.
`java.lang.String` `getType()` A `DOMString` indicating which related data is expected in `relatedData`.
`void` `reset()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fSeverity

    public short fSeverity

### fMessage

    public java.lang.String fMessage

### fLocator

    public DOMLocatorImpl fLocator

### fException

    public java.lang.Exception fException

### fType

    public java.lang.String fType

### fRelatedData

    public java.lang.Object fRelatedData

Constructor Detail

### DOMErrorImpl

    public DOMErrorImpl()

  Default constructor.

### DOMErrorImpl

    public DOMErrorImpl(short severity,
                        org.apache.xerces.xni.parser.XMLParseException exception)

  Exctracts information from XMLParserException)

Method Detail

### getSeverity

    public short getSeverity()

  The severity of the error, either `SEVERITY_WARNING`, `SEVERITY_ERROR`, or `SEVERITY_FATAL_ERROR`.
  Specified by:
    `getSeverity` in interface `org.w3c.dom.DOMError`

### getMessage

    public java.lang.String getMessage()

  An implementation specific string describing the error that occured.
  Specified by:
    `getMessage` in interface `org.w3c.dom.DOMError`

### getLocation

    public org.w3c.dom.DOMLocator getLocation()

  The location of the error.
  Specified by:
    `getLocation` in interface `org.w3c.dom.DOMError`

### getRelatedException

    public java.lang.Object getRelatedException()

  The related platform dependent exception if any.exception is a reserved word, we need to rename it.Change to "relatedException". (F2F 26 Sep 2001)
  Specified by:
    `getRelatedException` in interface `org.w3c.dom.DOMError`

### reset

    public void reset()

### getType

    public java.lang.String getType()

  Description copied from interface: `org.w3c.dom.DOMError`
  A `DOMString` indicating which related data is expected in `relatedData`. Users should refer to the specification of the error in order to find its `DOMString` type and `relatedData` definitions if any.

  Note: As an example, `Document.normalizeDocument()` does generate warnings when the "split-cdata-sections" parameter is in use. Therefore, the method generates a `SEVERITY_WARNING` with `type` `"cdata-sections-splitted"` and the first `CDATASection` node in document order resulting from the split is returned by the `relatedData` attribute.

  Specified by:
    `getType` in interface `org.w3c.dom.DOMError`

### getRelatedData

    public java.lang.Object getRelatedData()

  Description copied from interface: `org.w3c.dom.DOMError`
  The related `DOMError.type` dependent data if any.
  Specified by:
    `getRelatedData` in interface `org.w3c.dom.DOMError`

Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.