grpcstarter.server.feature.exceptionhandling.annotation.DefaultGrpcExceptionAdvice Maven / Gradle / Ivy
package grpcstarter.server.feature.exceptionhandling.annotation;
import io.grpc.StatusException;
import io.grpc.StatusRuntimeException;
/**
* Handle exceptions recognized by gRPC.
*
*
* - {@link StatusRuntimeException}
* - {@link StatusException}
*
*
* @author Freeman
* @since 3.2.3
*/
@GrpcAdvice
public class DefaultGrpcExceptionAdvice {
@GrpcExceptionHandler
public StatusRuntimeException handleStatusRuntimeException(StatusRuntimeException e) {
return e;
}
@GrpcExceptionHandler
public StatusException handleStatusException(StatusException e) {
return e;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy