javax.xml.bind
Class JAXBException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.xml.bind.JAXBException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MarshalException, PMException, PropertyException, UnmarshalException, ValidationException

public class JAXBException
extends java.lang.Exception

This is the main exception class of JAXB. All other exception classes (except the TypeConstraintException, which is a RuntimeException are derived from the JAXBException.

Since:
JAXB1.0
Author:
JSR-31
See Also:
Serialized Form

Constructor Summary
JAXBException(java.lang.String pMessage)
          Creates a new JAXBException with the specified detail message.
JAXBException(java.lang.String pMessage, java.lang.String pErrorCode)
          Creates a new JAXBException with the specified detail message and vendor specific error code.
JAXBException(java.lang.String pMessage, java.lang.String pErrorCode, java.lang.Throwable pLinkedException)
          Creates a new JAXBException with the specified detail message, error code, and linked exception.
JAXBException(java.lang.String pMessage, java.lang.Throwable pLinkedException)
          Creates a new JAXBException with the specified detail message and linked exception.
JAXBException(java.lang.Throwable pLinkedException)
          Creates a new JAXBException with the specified linked exception.
 
Method Summary
 java.lang.String getErrorCode()
          Returns the vendor specific error code, if any, or null.
 java.lang.Throwable getLinkedException()
          Returns the linked exception, if any, or null.
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream pStream)
           
 void printStackTrace(java.io.PrintWriter pWriter)
           
 void setLinkedException(java.lang.Throwable pLinkedException)
          Sets the linked exception.
 java.lang.String toString()
          Converts the linked exception into a String.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JAXBException

public JAXBException(java.lang.String pMessage)

Creates a new JAXBException with the specified detail message.

Parameters:
pMessage - The detail message.

JAXBException

public JAXBException(java.lang.String pMessage,
                     java.lang.String pErrorCode)

Creates a new JAXBException with the specified detail message and vendor specific error code.

Parameters:
pMessage - The detail message.
pErrorCode - The error code.

JAXBException

public JAXBException(java.lang.Throwable pLinkedException)

Creates a new JAXBException with the specified linked exception.

Parameters:
pLinkedException - The linked exception.

JAXBException

public JAXBException(java.lang.String pMessage,
                     java.lang.Throwable pLinkedException)

Creates a new JAXBException with the specified detail message and linked exception.

Parameters:
pMessage - The detail message.
pLinkedException - The linked exception.

JAXBException

public JAXBException(java.lang.String pMessage,
                     java.lang.String pErrorCode,
                     java.lang.Throwable pLinkedException)

Creates a new JAXBException with the specified detail message, error code, and linked exception.

Parameters:
pMessage - The detail message.
pErrorCode - The vendor specific error code.
pLinkedException - The linked exception.
Method Detail

getErrorCode

public java.lang.String getErrorCode()

Returns the vendor specific error code, if any, or null.


getLinkedException

public java.lang.Throwable getLinkedException()

Returns the linked exception, if any, or null.


setLinkedException

public void setLinkedException(java.lang.Throwable pLinkedException)

Sets the linked exception.

Parameters:
pLinkedException - The linked exception or null.

toString

public java.lang.String toString()

Converts the linked exception into a String. Overridden, because the returned string should contain the vendor specific error code, if any.

Overrides:
toString in class java.lang.Throwable

printStackTrace

public void printStackTrace()
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream pStream)
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter pWriter)
Overrides:
printStackTrace in class java.lang.Throwable