public class HandledException extends Object
WebErrorHandler| Constructor and Description |
|---|
HandledException(Set<String> errorCodes,
org.springframework.http.HttpStatus statusCode,
Map<String,List<?>> arguments)
Initialize a handled exception with a set of error codes, a HTTP status code and an
optional collection of arguments.
|
HandledException(String errorCode,
org.springframework.http.HttpStatus statusCode,
Map<String,List<?>> arguments)
Initialize a handled exception with an error code, a HTTP status code and an
optional collection of arguments.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,List<?>> |
getArguments() |
Set<String> |
getErrorCodes() |
org.springframework.http.HttpStatus |
getStatusCode() |
public HandledException(@NonNull
Set<String> errorCodes,
@NonNull
org.springframework.http.HttpStatus statusCode,
@Nullable
Map<String,List<?>> arguments)
errorCodes - The corresponding error codes for the handled exception.statusCode - The corresponding status code for the handled exception.arguments - Arguments to be exposed from the handled exception to the outside world.NullPointerException - When one of the required parameters is null.IllegalArgumentException - At least one error code should be provided.public HandledException(@NonNull
String errorCode,
@NonNull
org.springframework.http.HttpStatus statusCode,
@Nullable
Map<String,List<?>> arguments)
errorCode - The corresponding error code for the handled exception.statusCode - The corresponding status code for the handled exception.arguments - Arguments to be exposed from the handled exception to the outside world.NullPointerException - When one of the required parameters is null.IllegalArgumentException - At least one error code should be provided.@NonNull public Set<String> getErrorCodes()
errorCodes@NonNull public org.springframework.http.HttpStatus getStatusCode()
statusCodeCopyright © 2018. All rights reserved.