MarcosZyk commented on code in PR #8700: URL: https://github.com/apache/iotdb/pull/8700#discussion_r1059951628
########## node-commons/src/main/java/org/apache/iotdb/commons/schema/tree/AbstractTreeVisitor.java: ########## @@ -135,12 +146,23 @@ public void reset() { initStack(); } + @Override + public void close() { + while (!visitorStack.isEmpty()) { + popStack(); + } + } + @Override public boolean hasNext() { - if (nextMatchedNode == null) { - getNext(); + if (exception == null && nextMatchedNode == null) { + try { + getNext(); + } catch (Exception e) { Review Comment: catch throwable. ########## node-commons/src/main/java/org/apache/iotdb/commons/schema/tree/AbstractTreeVisitor.java: ########## @@ -308,7 +341,12 @@ private abstract class AbstractChildrenIterator implements Iterator<N> { @Override public boolean hasNext() { if (nextMatchedChild == null) { - getNext(); + try { + getNext(); + } catch (Exception e) { Review Comment: Catch throwable -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org