public class ConversionException extends RuntimeException
Constructor and Description |
---|
ConversionException(ConversionException source,
String field)
This constructor is invoked from Bean->XML conversions, to prepend
a field component to the location before rethrowing the exception.
|
ConversionException(String message)
This constructor is called from code that is not location-aware.
|
ConversionException(String message,
Element elem)
This constructor is invoked from XML->Bean conversions, where the
converter is aware of its location.
|
ConversionException(String message,
Element elem,
Throwable cause)
This constructor is invoked from XML->Bean conversions, where the
converter is aware of its location.
|
ConversionException(String message,
String field)
This constructor is invoked from Bean->XML conversions, where the
converter is aware of its location.
|
ConversionException(String message,
String field,
Throwable cause)
This constructor is invoked from Bean->XML conversions, where the
converter is aware of its location.
|
ConversionException(String message,
Throwable cause)
This constructor is called from code that is not location-aware.
|
Modifier and Type | Method and Description |
---|---|
String |
getField()
Returns the name of the field where this exception occurred,
null if unknown. |
String |
getXPath()
Returns the XPath of the node causing this exception,
null
if unknown. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ConversionException(String message)
message
- The base message describing the exception.public ConversionException(String message, Throwable cause)
message
- The base message describing the exception.cause
- The underlying cause of the exception.public ConversionException(String message, Element elem)
message
- The base message describing the exception.elem
- The DOM element where the failure took place.public ConversionException(String message, Element elem, Throwable cause)
message
- The base message describing the exception.elem
- The DOM element where the failure took place.cause
- The underlying cause of the exception.public ConversionException(String message, String field)
message
- The base message describing the exception.field
- The name of the field where the failure occurred.public ConversionException(String message, String field, Throwable cause)
message
- The base message describing the exception.field
- The name of the field where the failure occurred.cause
- The underlying cause of the exception.public ConversionException(ConversionException source, String field)
source
- The original exception.field
- The name of the field component to prepend.