protected T executeVisitWithCatch()

in camel-upgrade-recipes/src/main/java/org/apache/camel/upgrade/AbstractCamelJavaVisitor.java [129:136]


    protected <T extends J> T executeVisitWithCatch(Supplier<T> visitMethod, T origValue, ExecutionContext context) {
        try {
            return visitMethod.get();
        } catch (Exception e) {
            LOGGER.warn(String.format("Internal error detected in %s, recipe is skipped.", getClass().getName()), e);
            return origValue;
        }
    }