Package org.springframework.core.codec

# Class CodecException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.core.codec.CodecException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `DecodingException`, `EncodingException`

public class CodecException extends NestedRuntimeException
General error that indicates a problem while encoding and decoding to and from an Object stream.

Since:
  5.0
Author:
  Sebastien Deleuze, Rossen Stoyanchev
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`CodecException(String msg)`
Create a new CodecException.
`CodecException(String msg, Throwable cause)`
Create a new CodecException.

## Method Summary

### Methods inherited from class org.springframework.core.NestedRuntimeException

`contains, getMostSpecificCause, getRootCause`

### 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 Details

### CodecException

public CodecException(@Nullable String msg)
Create a new CodecException.

Parameters:
  `msg` - the detail message

### CodecException

public CodecException(@Nullable String msg, @Nullable Throwable cause)
Create a new CodecException.

Parameters:
  `msg` - the detail message
  `cause` - root cause for the exception, if any