JAXB
v0.21

javax.xml.bind
Class UnmarshalException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.xml.bind.UnmarshalException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ConversionException, ScanException, ValidationException

public abstract class UnmarshalException
extends Exception

Abstract checked-exception class for exceptions thrown when errors occur during unmarshalling.

Unmarshalling errors fall into three categories, each of which has a specific subclass of this class:

Validation exceptions are further subdivided as described in the specification of the ValidationException class.

Version:
1.4, 01/05/31
See Also:
Dispatcher, Element, MarshallableObject, RootElement, Validator, Serialized Form

Constructor Summary
protected UnmarshalException()
          Initializes a new instance of this class.
protected UnmarshalException(ScanPosition pos)
          Initializes a new instance of this class with the given scan position.
protected UnmarshalException(ScanPosition pos, String desc)
          Initializes a new instance of this class with the given scan position and description.
protected UnmarshalException(String desc)
          Initializes a new instance of this class with the given description and no scan position.
 
Method Summary
 ScanPosition getPosition()
          Returns this exception's scan position, or null if the scan position is undefined.
 void initPosition(ScanPosition sp)
          Sets this exception's scan position.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnmarshalException

protected UnmarshalException()
Initializes a new instance of this class.

UnmarshalException

protected UnmarshalException(ScanPosition pos)
Initializes a new instance of this class with the given scan position.
Parameters:
pos - The scan position

UnmarshalException

protected UnmarshalException(ScanPosition pos,
                             String desc)
Initializes a new instance of this class with the given scan position and description.
Parameters:
pos - The scan position
desc - The description

UnmarshalException

protected UnmarshalException(String desc)
Initializes a new instance of this class with the given description and no scan position.
Parameters:
desc - The description
Method Detail

getPosition

public final ScanPosition getPosition()
Returns this exception's scan position, or null if the scan position is undefined.
Returns:
This exception's scan position

initPosition

public final void initPosition(ScanPosition sp)
Sets this exception's scan position. Once set, the scan position may not be set again.
Parameters:
sp - The scan position
Throws:
IllegalStateException - If the scan position has already been set

JAXB
v0.21


Comments to: jaxb-comments@java.sun.com
More information at: http://java.sun.com/xml/jaxb

Copyright © 2001 by Sun Microsystems, Inc., 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.