private Object[] determineInstancedParameters(final Method mappedMethod, final Throwable exception) {

        final Parameter[] parameters = mappedMethod.getParameters();
        final Object[] instancedParams = new Object[parameters.length];

        for (int i = 0; i < parameters.length; i++) {
            final Class<?> parameterClass = convertToClass(parameters[i]);
            if (parameterClass.isAssignableFrom(exception.getClass())) {
                instancedParams[i] = exception;
                break;
            }
        }
        return instancedParams;
    }
Given an exception, a lookup is performed to retrieve mapped method. <br>
In case of successful returned method, and matching exception parameter type for given exception, the exception
is handed over to retrieved method. Retrieved method is then being invoked.

@param exception exception to search for
@return result of invoked mapped method to given exception
@throws Throwable rethrows exception if no mapping existent or exceptions raised by implementation
grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/advice/GrpcAdviceExceptionHandler.java