public class ServerErrorException extends ResponseStatusException
HttpStatus.INTERNAL_SERVER_ERROR
that exposes extra
information about a controller method that failed, or a controller method
argument that could not be resolved.Constructor and Description |
---|
ServerErrorException(String reason)
Deprecated.
in favor of
ServerErrorException(String, Throwable) |
ServerErrorException(String reason,
MethodParameter parameter)
Deprecated.
|
ServerErrorException(String reason,
MethodParameter parameter,
Throwable cause)
Constructor for a 500 error with a
MethodParameter and an optional cause. |
ServerErrorException(String reason,
Method handlerMethod,
Throwable cause)
Constructor for a 500 error with a handler
Method and an optional cause. |
ServerErrorException(String reason,
Throwable cause)
Constructor for a 500 error with a reason and an optional cause.
|
Modifier and Type | Method and Description |
---|---|
Method |
getHandlerMethod()
Return the handler method associated with the error, if any.
|
MethodParameter |
getMethodParameter()
Return the specific method parameter associated with the error, if any.
|
getHeaders, getMessage, getRawStatusCode, getReason, getResponseHeaders, getStatus
contains, getMostSpecificCause, getRootCause
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ServerErrorException(String reason, @Nullable Throwable cause)
public ServerErrorException(String reason, Method handlerMethod, @Nullable Throwable cause)
Method
and an optional cause.public ServerErrorException(String reason, MethodParameter parameter, @Nullable Throwable cause)
MethodParameter
and an optional cause.@Deprecated public ServerErrorException(String reason, MethodParameter parameter)
ServerErrorException(String, MethodParameter, Throwable)
MethodParameter
.@Deprecated public ServerErrorException(String reason)
ServerErrorException(String, Throwable)
@Nullable public Method getHandlerMethod()
@Nullable public MethodParameter getMethodParameter()