1
0
Fork 0

a more informative message if getSuggestion() fails

This commit is contained in:
sspanak 2025-03-17 11:28:12 +02:00 committed by Dimo Karaivanov
parent 12ca3ca1bc
commit 15c618bc0b

View file

@ -168,7 +168,11 @@ public class SuggestionsBar {
return suggestion;
}
return stem + suggestion.substring(startIndex, endIndex);
try {
return stem + suggestion.substring(startIndex, endIndex);
} catch (Exception e) {
throw new IndexOutOfBoundsException("Failed cutting '" + suggestion + "' from: " + startIndex + " to: " + endIndex);
}
}