From 999e98d2db34b4b7672f6c1fa8959056ec54cc8b Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Mon, 9 Nov 2015 13:54:09 -0500 Subject: [PATCH] Fixes for logging and exception handling --- .../org/sleuthkit/autopsy/casemodule/services/Blackboard.java | 2 +- .../sleuthkit/autopsy/casemodule/services/Bundle.properties | 3 ++- .../sleuthkit/autopsy/modules/android/ContactAnalyzer.java | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/services/Blackboard.java b/Core/src/org/sleuthkit/autopsy/casemodule/services/Blackboard.java index 46a4b9bb17..d33c304f4c 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/services/Blackboard.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/services/Blackboard.java @@ -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); } } diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/services/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/services/Bundle.properties index 27449b26cc..2d75572fd9 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/services/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/services/Bundle.properties @@ -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} \ No newline at end of file +Blackboard.unableToIndexArtifact.exception.msg=Unable to index blackboard artifact +Blackboard.unableToIndexArtifact.error.msg=Unable to index blackboard artifact {0} diff --git a/Core/src/org/sleuthkit/autopsy/modules/android/ContactAnalyzer.java b/Core/src/org/sleuthkit/autopsy/modules/android/ContactAnalyzer.java index f470038972..c3bc4f6b61 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/android/ContactAnalyzer.java +++ b/Core/src/org/sleuthkit/autopsy/modules/android/ContactAnalyzer.java @@ -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()); } }