Package org.springframework.web.server
Class ServerErrorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.web.ErrorResponseException
org.springframework.web.server.ResponseStatusException
org.springframework.web.server.ServerErrorException
- All Implemented Interfaces:
Serializable
,ErrorResponse
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.- Since:
- 5.0
- Author:
- Rossen Stoyanchev
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.web.ErrorResponse
ErrorResponse.Builder
-
Constructor Summary
ConstructorDescriptionServerErrorException
(String reason, Method handlerMethod, Throwable cause) Constructor for a 500 error with a handlerMethod
and an optional cause.ServerErrorException
(String reason, Throwable cause) Constructor for a 500 error with a reason and an optional cause.ServerErrorException
(String reason, MethodParameter parameter, Throwable cause) Constructor for a 500 error with aMethodParameter
and an optional cause. -
Method Summary
Modifier and TypeMethodDescriptionReturn the handler method associated with the error, if any.Return the specific method parameter associated with the error, if any.Methods inherited from class org.springframework.web.server.ResponseStatusException
getHeaders, getMessage, getReason, getResponseHeaders
Methods inherited from class org.springframework.web.ErrorResponseException
getBody, getDetailMessageArguments, getDetailMessageCode, getStatusCode, setDetail, setInstance, setTitle, setType
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.web.ErrorResponse
getDetailMessageArguments, getTitleMessageCode, updateAndGetBody
-
Constructor Details
-
ServerErrorException
Constructor for a 500 error with a reason and an optional cause.- Since:
- 5.0.5
-
ServerErrorException
Constructor for a 500 error with a handlerMethod
and an optional cause.- Since:
- 5.0.5
-
ServerErrorException
Constructor for a 500 error with aMethodParameter
and an optional cause.
-
-
Method Details
-
getHandlerMethod
Return the handler method associated with the error, if any.- Since:
- 5.0.5
-
getMethodParameter
Return the specific method parameter associated with the error, if any.
-