Class UnmarshalException

All Implemented Interfaces:
Serializable, ErrorCodeAccessor, Trap

public class UnmarshalException extends AbstractException
Thrown when unmarshaling / deserializing an object fails.
See Also:
  • Field Details

    • _offset

      protected int _offset
  • Constructor Details

    • UnmarshalException

      public UnmarshalException(String aMessage)
    • UnmarshalException

      public UnmarshalException(String aMessage, int aOffset, Throwable aCause)
      Parameters:
      aOffset - The offset in the char sequence causing problems.
    • UnmarshalException

      public UnmarshalException(String aMessage, int aOffset)
      Parameters:
      aOffset - The offset in the char sequence causing problems.
    • UnmarshalException

      public UnmarshalException(String aMessage, Throwable aCause)
    • UnmarshalException

      public UnmarshalException(Throwable aCause)
    • UnmarshalException

      public UnmarshalException(String aMessage, String aErrorCode)
    • UnmarshalException

      public UnmarshalException(String aMessage, Throwable aCause, String aErrorCode)
    • UnmarshalException

      public UnmarshalException(Throwable aCause, String aErrorCode)
  • 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

      public Object[] getPatternArguments()
      Provides the arguments for the Throwable.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 the Trap.asMessage(String, Object...) method). Override the Trap.getPatternArguments() method to provide the required arguments for applying Trap.asMessage(String, Object...) to the message template! Providing null will 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!