public class ServerErrorException extends ResponseStatusException
MethodParameter if related to the error).| Modifier and Type | Field and Description |
|---|---|
private MethodParameter |
parameter |
| Constructor and Description |
|---|
ServerErrorException(java.lang.String reason)
Constructor with an explanation only.
|
ServerErrorException(java.lang.String reason,
MethodParameter parameter)
Constructor for a 500 error linked to a specific
MethodParameter. |
ServerErrorException(java.lang.String reason,
MethodParameter parameter,
java.lang.Throwable cause)
Constructor for a 500 error with a root cause.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<MethodParameter> |
getMethodParameter()
Return the
MethodParameter associated with this error, if any. |
getReason, getStatuscontains, getMessage, getMostSpecificCause, getRootCauseprivate final MethodParameter parameter
public ServerErrorException(java.lang.String reason)
public ServerErrorException(java.lang.String reason,
MethodParameter parameter)
MethodParameter.public ServerErrorException(java.lang.String reason,
MethodParameter parameter,
java.lang.Throwable cause)
public java.util.Optional<MethodParameter> getMethodParameter()
MethodParameter associated with this error, if any.