Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fasterxml.aalto
Class ValidationException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              javax.xml.stream.XMLStreamException
                  org.codehaus.stax2.validation.XMLValidationException
                      com.fasterxml.aalto.ValidationException

All Implemented Interfaces:
  Serializable

    public class ValidationException

extends org.codehaus.stax2.validation.XMLValidationException

Specific exception thrown when document has validation (DTD, W3C Schema) errors; things that are not well-formedness problems.

The current implementation does not add much beyond basic `XMLValidationException`, except for fixing some problems that underlying `XMLStreamException` has.

Note that some of the code is shared with other sub-classes. Unfortunately it is not possible to extend it, since they extend `XMLStreamException`, not `XMLValidationException`.

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.codehaus.stax2.validation.XMLValidationException
`mCause`

Fields inherited from class javax.xml.stream.XMLStreamException
`location, nested`

Constructor Summary
`protected` | `ValidationException(org.codehaus.stax2.validation.XMLValidationProblem cause, String msg)`
`protected` | `ValidationException(org.codehaus.stax2.validation.XMLValidationProblem cause, String msg, Location loc)`

Method Summary
`static ValidationException` | `create(org.codehaus.stax2.validation.XMLValidationProblem cause)`
`protected String` | `getLocationDesc()`
`String` | `getMessage()` Method is overridden for two main reasons: first, default method does not display public/system id information, even if it exists, and second, default implementation can not handle nested Location information.
`String` | `toString()`

Methods inherited from class org.codehaus.stax2.validation.XMLValidationException
`createException, getValidationProblem, throwMissing`

Methods inherited from class javax.xml.stream.XMLStreamException
`getLocation, getNestedException`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

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

Constructor Detail

### ValidationException

    protected ValidationException(org.codehaus.stax2.validation.XMLValidationProblem cause,
                                  String msg)

### ValidationException

    protected ValidationException(org.codehaus.stax2.validation.XMLValidationProblem cause,
                                  String msg,
                                  Location loc)

Method Detail

### create

    public static ValidationException create(org.codehaus.stax2.validation.XMLValidationProblem cause)

### getMessage

    public String getMessage()

  Method is overridden for two main reasons: first, default method does not display public/system id information, even if it exists, and second, default implementation can not handle nested Location information.

  Overrides:
    `getMessage` in class `Throwable`

### toString

    public String toString()

  Overrides:
    `toString` in class `Throwable`

### getLocationDesc

    protected String getLocationDesc()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 Fasterxml.com. All Rights Reserved.