@PublicApi public class SimpleDataFetcherExceptionHandler extends java.lang.Object implements DataFetcherExceptionHandler
ExceptionWhileDataFetching
error
into the error collectionConstructor and Description |
---|
SimpleDataFetcherExceptionHandler() |
Modifier and Type | Method and Description |
---|---|
DataFetcherExceptionHandlerResult |
onException(DataFetcherExceptionHandlerParameters handlerParameters)
When an exception occurs during a call to a
DataFetcher then this handler
is called to shape the errors that should be placed in the ExecutionResult.getErrors()
list of errors. |
protected java.lang.Throwable |
unwrap(java.lang.Throwable exception)
Called to unwrap an exception to a more suitable cause if required.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleException
public DataFetcherExceptionHandlerResult onException(DataFetcherExceptionHandlerParameters handlerParameters)
DataFetcherExceptionHandler
DataFetcher
then this handler
is called to shape the errors that should be placed in the ExecutionResult.getErrors()
list of errors.onException
in interface DataFetcherExceptionHandler
handlerParameters
- the parameters to this callbackGraphQLError
sprotected java.lang.Throwable unwrap(java.lang.Throwable exception)
exception
- the exception to unwrap