public class ResponseStatusException
extends org.springframework.core.NestedRuntimeException
Constructor and Description |
---|
ResponseStatusException(HttpStatus status,
String reason)
Constructor with a response code and a reason to add to the exception
message as explanation.
|
ResponseStatusException(HttpStatus status,
String reason,
Throwable cause)
Constructor with a nested exception.
|
Modifier and Type | Method and Description |
---|---|
String |
getReason()
The reason explaining the exception.
|
HttpStatus |
getStatus()
The HTTP status that fits the exception.
|
contains, getMessage, getMostSpecificCause, getRootCause
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ResponseStatusException(HttpStatus status, String reason)
public ResponseStatusException(HttpStatus status, String reason, Throwable cause)
public HttpStatus getStatus()
public String getReason()