Package org.apache.juneau.serializer
Class SerializeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.BasicRuntimeException
org.apache.juneau.serializer.SerializeException
- All Implemented Interfaces:
- Serializable
General exception thrown whenever an error occurs during serialization.
 
See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionSerializeException(String message, Object... args) Constructor.SerializeException(Throwable causedBy) Constructor.SerializeException(SerializerSession session, Exception causedBy) Constructor.SerializeException(SerializerSession session, String message, Object... args) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionstatic SerializeExceptionCreator method.Returns the highest-levelParseException in the stack trace.Sets the inner cause for this exception.Methods inherited from class org.apache.juneau.BasicRuntimeExceptionassertModifiable, fillInStackTrace, getCause, getMessage, isUnmodifiable, setMessage, setStackTrace, setUnmodifiable, unwrapMethods inherited from class java.lang.ThrowableaddSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, toString
- 
Constructor Details- 
SerializeExceptionConstructor.- Parameters:
- session- The serializer session to extract information from.
- message- The exception message containing- MessageFormat-style arguments.
- args- Optional- MessageFormat-style arguments.
 
- 
SerializeExceptionConstructor.- Parameters:
- message- The exception message containing- MessageFormat-style arguments.
- args- Optional- MessageFormat-style arguments.
 
- 
SerializeExceptionConstructor.- Parameters:
- session- The serializer session to extract information from.
- causedBy- The inner exception.
 
- 
SerializeExceptionConstructor.- Parameters:
- causedBy- The inner exception.
 
 
- 
- 
Method Details- 
createCreator method.If the throwable is already a SerializeException, we simply return that exception as-is. If the throwable is anInvocationTargetException, we unwrap the thrown exception. Otherwise we create a newSerializeException.- Parameters:
- e- The exception being wrapped or unwrapped.
- Returns:
- A new SerializeException.
 
- 
getRootCauseReturns the highest-levelParseException in the stack trace. Useful for JUnit testing of error conditions.- Returns:
- The root parse exception, or this exception if there isn't one.
 
- 
initCauseSets the inner cause for this exception.- Overrides:
- initCausein class- BasicRuntimeException
- Parameters:
- cause- The inner cause.
- Returns:
- This object.
 
 
-