public class ResponseStatusException extends NestedRuntimeException
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
reason |
private HttpStatus |
status |
Constructor and Description |
---|
ResponseStatusException(HttpStatus status,
java.lang.String reason)
Constructor with a response code and a reason to add to the exception
message as explanation.
|
ResponseStatusException(HttpStatus status,
java.lang.String reason,
java.lang.Throwable cause)
Constructor with a nested exception.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getReason()
The reason explaining the exception.
|
HttpStatus |
getStatus()
The HTTP status that fits the exception.
|
contains, getMessage, getMostSpecificCause, getRootCause
private final HttpStatus status
private final java.lang.String reason
public ResponseStatusException(HttpStatus status, java.lang.String reason)
public ResponseStatusException(HttpStatus status, java.lang.String reason, java.lang.Throwable cause)
public HttpStatus getStatus()
public java.lang.String getReason()