Hi everyone,
In working on the proposed Segmenter API, I've come across an inconsistency in the type of exceptions that BreakIterator throws.
In particular, when you call some APIs like `isBoundary(int offset)`, they will internally first check the provided offset value using a helper method `
checkOffset(int offset, ...)`. In turn, checkOffset will throw an exception if the offset is out of range for the input string's indices. The inconsistency is that the exception it throws is IllegalArgumentException, when it should be IndexOutOfBoundsException.
I am planning to change the exception type from IllegalArgumentException to IndexOutOfBoundsException accordingly. Let me know if any of you take exception to that (pun sort of intended, sorry).
-- Elango