Skip to content

Commit d9caaae

Browse files
committed
Do not throw HistoryException from IndexDatabase.update()
Better to log and proceed to the next directory.
1 parent 4b1014b commit d9caaae

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/org/opensolaris/opengrok/index/IndexDatabase.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,8 @@ private void markProjectIndexed(Project project) throws IOException {
357357
* Update the content of this index database
358358
*
359359
* @throws IOException if an error occurs
360-
* @throws HistoryException if an error occurs when accessing the history
361360
*/
362-
public void update() throws IOException, HistoryException {
361+
public void update() throws IOException {
363362
synchronized (lock) {
364363
if (running) {
365364
throw new IOException("Indexer already running!");
@@ -413,7 +412,16 @@ public void update() throws IOException, HistoryException {
413412
}
414413

415414
if (env.isHistoryEnabled()) {
416-
HistoryGuru.getInstance().ensureHistoryCacheExists(sourceRoot);
415+
try {
416+
HistoryGuru.getInstance().ensureHistoryCacheExists(
417+
sourceRoot);
418+
} catch (HistoryException ex) {
419+
String exmsg = String.format(
420+
"Failed to ensureHistoryCacheExists() for %s",
421+
sourceRoot);
422+
LOGGER.log(Level.SEVERE, exmsg, ex);
423+
continue;
424+
}
417425
}
418426

419427
String startuid = Util.path2uid(dir, "");

0 commit comments

Comments
 (0)