public class TypeMismatchWebErrorHandler extends Object implements WebErrorHandler
WebErrorHandler implementation responsible for handling TypeMismatchExceptions.| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE_MISMATCH
Basic error code for all type mismatches.
|
| Constructor and Description |
|---|
TypeMismatchWebErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandle(Throwable exception)
Only can handle exceptions of type
TypeMismatchException. |
HandledException |
handle(Throwable exception)
Cast the given exception to
TypeMismatchException and return a handled exception
instance by extracting the error code and exposing appropriate arguments. |
public static final String TYPE_MISMATCH
public boolean canHandle(Throwable exception)
TypeMismatchException.canHandle in interface WebErrorHandlerexception - The exception to examine.true if the exception is TypeMismatchException, false otherwise.@NonNull public HandledException handle(Throwable exception)
TypeMismatchException and return a handled exception
instance by extracting the error code and exposing appropriate arguments.handle in interface WebErrorHandlerexception - The exception to handle.Copyright © 2019. All rights reserved.