Class UnmarshalException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.refcodes.exception.AbstractException
org.refcodes.exception.UnmarshalException
- All Implemented Interfaces:
Serializable, ErrorCodeAccessor, Trap
Thrown when unmarshaling / deserializing an object fails.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface ErrorCodeAccessor
ErrorCodeAccessor.ErrorCodeBuilder<B>, ErrorCodeAccessor.ErrorCodeMutator, ErrorCodeAccessor.ErrorCodeProperty -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUnmarshalException(String aMessage) Instantiates the classUnmarshalException.UnmarshalException(String aMessage, int aOffset) Instantiates the classUnmarshalException.UnmarshalException(String aMessage, int aOffset, Throwable aCause) Instantiates the classUnmarshalException.UnmarshalException(String aMessage, String aErrorCode) Instantiates the classUnmarshalException.UnmarshalException(String aMessage, Throwable aCause) Instantiates the classUnmarshalException.UnmarshalException(String aMessage, Throwable aCause, String aErrorCode) Instantiates the classUnmarshalException.UnmarshalException(Throwable aCause) Instantiates the classUnmarshalException.UnmarshalException(Throwable aCause, String aErrorCode) Instantiates the classUnmarshalException. -
Method Summary
Modifier and TypeMethodDescriptionintIn case of a char sequence, the offset represents the position at which unmarshaling failed.Object[]Provides the arguments for theThrowable.getMessage()method to create the actual message from the message pattern (passed as message argument to the exception's constructors).Methods inherited from class AbstractException
getErrorCode, getMessageMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Trap
toLocalizedMessage, toMessage, toMessage, toMessage, toShortLocalizedMessage, toShortMessage
-
Field Details
-
_offset
protected int _offset
-
-
Constructor Details
-
UnmarshalException
-
UnmarshalException
Instantiates the classUnmarshalException.- Parameters:
aOffset- The offset in the char sequence causing problems.- See Also:
-
UnmarshalException
Instantiates the classUnmarshalException.- Parameters:
aOffset- The offset in the char sequence causing problems.- See Also:
-
UnmarshalException
Instantiates the classUnmarshalException.- See Also:
-
UnmarshalException
-
UnmarshalException
Instantiates the classUnmarshalException.- See Also:
-
UnmarshalException
Instantiates the classUnmarshalException.- See Also:
-
UnmarshalException
Instantiates the classUnmarshalException.- See Also:
-
-
Method Details
-
getOffset
public int getOffset()In case of a char sequence, the offset represents the position at which unmarshaling failed.- Returns:
- The position at which unmarshaling failed or -1 if none such position is available.
-
getPatternArguments
Provides the arguments for theThrowable.getMessage()method to create the actual message from the message pattern (passed as message argument to the exception's constructors). The message pattern together with the arguments are passed to theTrap.asMessage(String, Object...)method). Override theTrap.getPatternArguments()method to provide the required arguments for applyingTrap.asMessage(String, Object...)to the message template! Providingnullwill return the message pattern untouched.- Returns:
- The arguments required to build a message from the message pattern or null if the message pattern is to be returned directly!
-