public class MissingRequestCookieException extends MissingRequestValueException
ServletRequestBindingException
subclass that indicates
that a request cookie expected in the method parameters of an
@RequestMapping
method is not present.MissingRequestHeaderException
,
Serialized FormConstructor and Description |
---|
MissingRequestCookieException(String cookieName,
MethodParameter parameter)
Constructor for MissingRequestCookieException.
|
MissingRequestCookieException(String cookieName,
MethodParameter parameter,
boolean missingAfterConversion)
Constructor for use when a value was present but converted to
null . |
Modifier and Type | Method and Description |
---|---|
String |
getCookieName()
Return the expected name of the request cookie.
|
String |
getMessage()
Return the detail message, including the message from the nested exception
if there is one.
|
MethodParameter |
getParameter()
Return the method parameter bound to the request cookie.
|
isMissingAfterConversion
getRootCause
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public MissingRequestCookieException(String cookieName, MethodParameter parameter)
cookieName
- the name of the missing request cookieparameter
- the method parameterpublic MissingRequestCookieException(String cookieName, MethodParameter parameter, boolean missingAfterConversion)
null
.cookieName
- the name of the missing request cookieparameter
- the method parametermissingAfterConversion
- whether the value became null after conversionpublic String getMessage()
NestedServletException
getMessage
in class NestedServletException
public final String getCookieName()
public final MethodParameter getParameter()