void (TreePath parent, N node) { TreePath result = null; if (node != null) { try { TreePath path = TreePathUtil.createTreePath(parent, converter.apply(node)); switch (visitor.visit(path)) { case CONTINUE -> { update(null, State.REQUESTED); if (processChildren(path, node)) processNextPath(); return; } case INTERRUPT -> result = path; case SKIP_CHILDREN, SKIP_SIBLINGS -> { } } } catch (Exception error) { setError(error); return; } } update(null, State.FINISHED); promise.setResult(result); }