drhaozhong opened a new issue, #12240:
URL: https://github.com/apache/lucene/issues/12240
### Description
I find that my code fails to handle the failures of clones, when clones
happen in queryparser.
I notice that lucene hides CloneNotSupportedException, and throws
RuntimeException. For example, CharArrayIterator has the following code:
`public CharArrayIterator clone() {
try {
return (CharArrayIterator) super.clone();
} catch (CloneNotSupportedException e) {
// CharacterIterator does not allow you to throw CloneNotSupported
throw new RuntimeException(e);
}
}`
Due to the above observation, my code catches RuntimeException, and analyzes
its embedded CloneNotSupportedException, when it needs to handle the failures
of clones.
However, when I start to call queryparser, I find it does not hide
CloneNotSupportedException. As a result, my code fails to catch failed clones
when calling queryparser.
Will lucene fix the problem? If not, I will have to update all my handling
code.
### Version and environment details
_No response_
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]