Skip to content

Commit

Permalink
fix: fix the code smell warnings in DictionaryLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
vvatanabe committed Aug 31, 2023
1 parent 4823ae9 commit 1f0ac1a
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,15 @@ public Dictionary load() throws IOException {
words.add(line);
}
} catch (IOException e) {
throw new RuntimeException("Error while reading " + name);
throw new DictionaryLoadException("Error while reading " + name, e);
}
return new Dictionary(name, words);
}

static class DictionaryLoadException extends IOException {

DictionaryLoadException(String message, Throwable cause) {
super(message, cause);
}
}
}

0 comments on commit 1f0ac1a

Please sign in to comment.