Class DecodingException

  • All Implemented Interfaces:

    public class DecodingException
    extends CodecException
    Indicates an issue with decoding the input stream with a focus on content related issues such as a parse failure. As opposed to more general I/O errors, illegal state, or a CodecException such as a configuration issue that a Decoder may choose to raise.

    For example in server web application, a DecodingException would translate to a response with a 400 (bad input) status while CodecException would translate to 500 (server error) status.

    Rossen Stoyanchev
    See Also:
    Decoder, Serialized Form
    • Constructor Summary

      Constructor and Description
      DecodingException(java.lang.String msg)
      Create a new DecodingException.
      DecodingException(java.lang.String msg, java.lang.Throwable cause)
      Create a new DecodingException.
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, 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

      • DecodingException

        public DecodingException(java.lang.String msg)
        Create a new DecodingException.
        msg - the detail message
      • DecodingException

        public DecodingException(java.lang.String msg,
                                 java.lang.Throwable cause)
        Create a new DecodingException.
        msg - the detail message
        cause - root cause for the exception, if any