Top Description Fields Constructors Methods
jakarta.xml.bind

public Class MarshalException

extends JAXBException
Class Inheritance

This exception indicates that an error has occurred while performing a marshal operation that the provider is unable to recover from.

The ValidationEventHandler can cause this exception to be thrown during the marshal operations. See ValidationEventHandler.handleEvent(ValidationEvent).

Author
Since
1.6, JAXB 1.0
See Also
JAXBException, Marshaller

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
MarshalException(String
a description of the exception
message
)

Construct a MarshalException with the specified detail message.

public
MarshalException(String
a description of the exception
message
,
String
a string specifying the vendor specific error code
errorCode
)

Construct a MarshalException with the specified detail message and vendor specific errorCode.

public
MarshalException(Throwable
the linked exception
exception
)

Construct a MarshalException with a linkedException.

public
MarshalException(String
a description of the exception
message
,
Throwable
the linked exception
exception
)

Construct a MarshalException with the specified detail message and linkedException.

public
MarshalException(String
a description of the exception
message
,
String
a string specifying the vendor specific error code
errorCode
,
Throwable
the linked exception
exception
)

Construct a MarshalException with the specified detail message, vendor specific errorCode, and linkedException.

Method Summary

Inherited from jakarta.xml.bind.JAXBException:
getCausegetErrorCodegetLinkedExceptionprintStackTraceprintStackTraceprintStackTracesetLinkedExceptiontoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.xml.bind.JAXBException.serialVersionUID.

Constructor Detail

MarshalExceptionback to summary
public MarshalException(String message)

Construct a MarshalException with the specified detail message. The errorCode and linkedException will default to null.

Parameters
message:String

a description of the exception

MarshalExceptionback to summary
public MarshalException(String message, String errorCode)

Construct a MarshalException with the specified detail message and vendor specific errorCode. The linkedException will default to null.

Parameters
message:String

a description of the exception

errorCode:String

a string specifying the vendor specific error code

MarshalExceptionback to summary
public MarshalException(Throwable exception)

Construct a MarshalException with a linkedException. The detail message and vendor specific errorCode will default to null.

Parameters
exception:Throwable

the linked exception

MarshalExceptionback to summary
public MarshalException(String message, Throwable exception)

Construct a MarshalException with the specified detail message and linkedException. The errorCode will default to null.

Parameters
message:String

a description of the exception

exception:Throwable

the linked exception

MarshalExceptionback to summary
public MarshalException(String message, String errorCode, Throwable exception)

Construct a MarshalException with the specified detail message, vendor specific errorCode, and linkedException.

Parameters
message:String

a description of the exception

errorCode:String

a string specifying the vendor specific error code

exception:Throwable

the linked exception