Class MessageException

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    HttpOutgoingRequestException, MessageEncodingInvalid, MessageEncodingUnspecified, MessageEncodingUnsupported

    public class MessageException
    extends java.lang.RuntimeException
    Signifies that some operation on a message failed.

    As these exceptions are expected to be quite common, and are caused by external rather than internal mistakes, they do not produce stack traces. If an HTTP request causes an error that should generate a stack trace, some other exception type should be used instead.

    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Message message()
      Gets Message causing this exception to be thrown.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MessageException

        public MessageException​(Message message)
        Creates new exception.
        Parameters:
        message - Offending message.
      • MessageException

        public MessageException​(Message message,
                                java.lang.String description)
        Creates new exception.
        Parameters:
        message - Offending message.
        description - Description to associate with exception.
      • MessageException

        public MessageException​(Message message,
                                java.lang.String description,
                                java.lang.Throwable cause)
        Creates new exception.
        Parameters:
        message - Offending message.
        description - Description to associate with exception.
        cause - Exception causing this exception to be thrown.
      • MessageException

        public MessageException​(Message message,
                                java.lang.Throwable cause)
        Creates new exception.
        Parameters:
        message - Offending message.
        cause - Exception causing this exception to be thrown.
    • Method Detail

      • message

        public Message message()
        Gets Message causing this exception to be thrown.
        Returns:
        Offending message.