public class GrpcAdviceExceptionHandler extends Object
@GrpcAdvice
, when a thrown exception is caught during gRPC calls (via global
interceptor GrpcAdviceExceptionInterceptor
, then this thrown exception is being handled. By
GrpcExceptionHandlerMethodResolver
is a mapping between exception and the in case to be executed method
provided. @GrpcAdvice
classes with annotated methods
@GrpcExceptionHandler
.
Constructor and Description |
---|
GrpcAdviceExceptionHandler(GrpcExceptionHandlerMethodResolver grpcExceptionHandlerMethodResolver) |
Modifier and Type | Method and Description |
---|---|
<E extends Throwable> |
handleThrownException(E exception)
Given an exception, a lookup is performed to retrieve mapped method.
|
public GrpcAdviceExceptionHandler(GrpcExceptionHandlerMethodResolver grpcExceptionHandlerMethodResolver)
@Nullable public <E extends Throwable> Object handleThrownException(E exception) throws Throwable
E
- type of exceptionexception
- exception to search forThrowable
- rethrows exception if no mapping existent or exceptions raised by implementation