Class HttpMessageNotReadableException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.core.NestedRuntimeException
- org.springframework.http.converter.HttpMessageConversionException
- org.springframework.http.converter.HttpMessageNotReadableException
- All Implemented Interfaces:
Serializable
public class HttpMessageNotReadableException extends HttpMessageConversionException
Thrown byHttpMessageConverter
implementations when theHttpMessageConverter.read(java.lang.Class<? extends T>, org.springframework.http.HttpInputMessage)
method fails.- Since:
- 3.0
- Author:
- Arjen Poutsma, Juergen Hoeller
- See Also:
- Serialized Form
Constructor Summary
Constructors Constructor Description HttpMessageNotReadableException(String msg)
Deprecated.as of 5.1, in favor ofHttpMessageNotReadableException(String, HttpInputMessage)
HttpMessageNotReadableException(String msg, Throwable cause)
Deprecated.as of 5.1, in favor ofHttpMessageNotReadableException(String, Throwable, HttpInputMessage)
HttpMessageNotReadableException(String msg, Throwable cause, HttpInputMessage httpInputMessage)
Create a new HttpMessageNotReadableException.HttpMessageNotReadableException(String msg, HttpInputMessage httpInputMessage)
Create a new HttpMessageNotReadableException.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpInputMessage
getHttpInputMessage()
Return the original HTTP message.Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Constructor Detail
HttpMessageNotReadableException
@Deprecated public HttpMessageNotReadableException(String msg)
Deprecated.as of 5.1, in favor ofHttpMessageNotReadableException(String, HttpInputMessage)
Create a new HttpMessageNotReadableException.- Parameters:
msg
- the detail message
HttpMessageNotReadableException
@Deprecated public HttpMessageNotReadableException(String msg, @Nullable Throwable cause)
Deprecated.as of 5.1, in favor ofHttpMessageNotReadableException(String, Throwable, HttpInputMessage)
Create a new HttpMessageNotReadableException.- Parameters:
msg
- the detail messagecause
- the root cause (if any)
HttpMessageNotReadableException
public HttpMessageNotReadableException(String msg, HttpInputMessage httpInputMessage)
Create a new HttpMessageNotReadableException.- Parameters:
msg
- the detail messagehttpInputMessage
- the original HTTP message- Since:
- 5.1
HttpMessageNotReadableException
public HttpMessageNotReadableException(String msg, @Nullable Throwable cause, HttpInputMessage httpInputMessage)
Create a new HttpMessageNotReadableException.- Parameters:
msg
- the detail messagecause
- the root cause (if any)httpInputMessage
- the original HTTP message- Since:
- 5.1
Method Detail
getHttpInputMessage
public HttpInputMessage getHttpInputMessage()
Return the original HTTP message.- Since:
- 5.1