Fixes for logging and exception handling

This commit is contained in:
Eugene Livis 2015-11-09 13:54:09 -05:00
parent 02a2cc39db
commit 999e98d2db
3 changed files with 5 additions and 4 deletions

View File

@ -51,7 +51,7 @@ public final class Blackboard implements Closeable {
try {
searchService.indexArtifact(artifact);
} catch (TskCoreException ex) {
throw new BlackboardException(NbBundle.getMessage(this.getClass(), "Blackboard.unableToIndexArtifact.exception.msg") + artifact.getDisplayName(), ex);
throw new BlackboardException(NbBundle.getMessage(this.getClass(), "Blackboard.unableToIndexArtifact.exception.msg"), ex);
}
}

View File

@ -20,4 +20,5 @@ TagsManager.deleteContentTag.noCaseWarning=Failed to publish content tag deleted
TagsManager.addBlackboardArtifactTag.noCaseWarning=Failed to publish new blackboard artifact tag event. There is no case open.
TagsManager.deleteBlackboardArtifactTag.noCaseWarning=Failed to publish blackboard artifact tag deleted event. There is no case open.
Blackboard.keywordSearchNotFound.exception.msg=Keyword search service not found.
Blackboard.unableToIndexArtifact.exception.msg=Unable to index blackboard artifact {0}
Blackboard.unableToIndexArtifact.exception.msg=Unable to index blackboard artifact
Blackboard.unableToIndexArtifact.error.msg=Unable to index blackboard artifact {0}

View File

@ -155,9 +155,9 @@ class ContactAnalyzer {
// index the artifact for keyword search
blackboard.indexArtifact(bba);
} catch (Blackboard.BlackboardException ex) {
logger.log(Level.SEVERE, NbBundle.getMessage(ContactAnalyzer.class, "Blackboard.unableToIndexArtifact.exception.msg") + bba.getDisplayName(), ex); //NON-NLS
logger.log(Level.SEVERE, NbBundle.getMessage(Blackboard.class, "Blackboard.unableToIndexArtifact.error.msg", bba.getDisplayName()), ex); //NON-NLS
MessageNotifyUtil.Notify.error(
NbBundle.getMessage(ContactAnalyzer.class, "Blackboard.unableToIndexArtifact.exception.msg"), bba.getDisplayName());
NbBundle.getMessage(Blackboard.class, "Blackboard.unableToIndexArtifact.exception.msg"), bba.getDisplayName());
}
}