spring-framework / org.springframework.core.codec / CodecException

CodecException

open class CodecException : NestedRuntimeException

General error that indicates a problem while encoding and decoding to and from an Object stream.

Author
Sebastien Deleuze

Author
Rossen Stoyanchev

Since
5.0

Constructors

<init>

CodecException(msg: String)
CodecException(msg: String, cause: Throwable)

Create a new CodecException.

Inheritors

DecodingException

open class DecodingException : 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.

EncodingException

open class EncodingException : CodecException

Indicates an issue with encoding the input Object stream with a focus on not being able to encode Objects. As opposed to a more general I/O errors or a CodecException such as a configuration issue that an Encoder may also choose to raise.