Skip to content

Commit e63457e

Browse files
committed
make sure HistoryException is thrown for all problems in storeFile()
1 parent 2f618ed commit e63457e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/FileHistoryCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,14 @@ public void storeFile(History history, File file, Repository repository) throws
294294
* @param file file to store the history object into
295295
* @param repo repository for the file
296296
* @param mergeHistory whether to merge the history with existing or store the histNew as is
297+
* @throws HistoryException if there was any problem with history cache generation
297298
*/
298299
private void storeFile(History histNew, File file, Repository repo, boolean mergeHistory) throws HistoryException {
299300
File cacheFile;
300301
try {
301302
cacheFile = getCachedFile(file);
302303
} catch (CacheException e) {
303-
LOGGER.log(Level.FINER, e.getMessage());
304-
return;
304+
throw new HistoryException(e);
305305
}
306306

307307
File dir = cacheFile.getParentFile();

0 commit comments

Comments
 (0)