Skip to content

Commit b71b247

Browse files
author
Vladimir Kotal
committed
catch IllegalArgumentException
1 parent 4fcd99b commit b71b247

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

suggester/src/main/java/org/opengrok/suggest/SuggesterProjectData.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,10 @@ private void initSearchCountMap() throws IOException {
300300
ChronicleMapAdapter m;
301301
try {
302302
m = new ChronicleMapAdapter(field, conf.getAverageKeySize(), conf.getEntries(), f);
303+
} catch (IllegalArgumentException e) {
304+
logger.log(Level.SEVERE, "Could not create ChronicleMap due to invalid key size: "
305+
+ conf.getAverageKeySize(), e);
306+
return;
303307
} catch (Throwable t) {
304308
logger.log(Level.SEVERE,
305309
"Could not create ChronicleMap, most popular completion disabled, if you are using "

0 commit comments

Comments
 (0)