jhump commented on code in PR #3266:
URL: https://github.com/apache/avro/pull/3266#discussion_r1932280664
##########
lang/c++/impl/json/JsonIO.hh:
##########
@@ -116,6 +116,8 @@ public:
return curToken;
}
+ bool hasMore();
Review Comment:
It is possible. But the reason I did not do that is because `peek()` throws
an exception if it's at the end, so it seemed better to add a way to check for
more instead of trying to peek and catching. Also the current exception is just
an `Exception`, not something like `EOFException`, so the code would need to
actually inspect the string message to make sure it is EOF, which seemed
brittle and undesirable.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]