Top Description Fields Constructors Methods
org.springframework.web.server

public Class ServerErrorException

extends ResponseStatusException
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.lang.reflect.Method, org.springframework.core.MethodParameter, org.springframework.http.HttpStatus, org.springframework.lang.Nullable

Exception for an HttpStatus#INTERNAL_SERVER_ERROR that exposes extra information about a controller method that failed, or a controller method argument that could not be resolved.
Author
Rossen Stoyanchev
Since
5.0

Field Summary

Modifier and TypeField and Description
private final Method
private final MethodParameter

Constructor Summary

AccessConstructor and Description
public
ServerErrorException(String reason, Throwable cause)

Constructor for a 500 error with a reason and an optional cause.

public
ServerErrorException(String reason, Method handlerMethod, Throwable cause)

Constructor for a 500 error with a handler Method and an optional cause.

public
ServerErrorException(String reason, MethodParameter parameter, Throwable cause)

Constructor for a 500 error with a MethodParameter and an optional cause.

Method Summary

Modifier and TypeMethod and Description
public Method
getHandlerMethod()

Return the handler method associated with the error, if any.

public MethodParameter
getMethodParameter()

Return the specific method parameter associated with the error, if any.

Inherited from org.springframework.web.server.ResponseStatusException:
getHeadersgetMessagegetReasongetResponseHeadersupdateAndGetBody

Field Detail

handlerMethodback to summary
private final Method handlerMethod
Annotations
@Nullable
parameterback to summary
private final MethodParameter parameter
Annotations
@Nullable

Constructor Detail

ServerErrorExceptionback to summary
public ServerErrorException(String reason, Throwable cause)

Constructor for a 500 error with a reason and an optional cause.

Since
5.0.5
ServerErrorExceptionback to summary
public ServerErrorException(String reason, Method handlerMethod, Throwable cause)

Constructor for a 500 error with a handler Method and an optional cause.

Since
5.0.5
ServerErrorExceptionback to summary
public ServerErrorException(String reason, MethodParameter parameter, Throwable cause)

Constructor for a 500 error with a MethodParameter and an optional cause.

Method Detail

getHandlerMethodback to summary
public Method getHandlerMethod()

Return the handler method associated with the error, if any.

Annotations
@Nullable
Since
5.0.5
getMethodParameterback to summary
public MethodParameter getMethodParameter()

Return the specific method parameter associated with the error, if any.

Annotations
@Nullable