Merge pull request #2430 from eugene7646/fix_error_msg

Fixed a very misleading error mesage
This commit is contained in:
Richard Cordovano 2016-12-14 10:05:06 -05:00 committed by GitHub
commit db904a6080

View File

@ -22,7 +22,6 @@ import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport; import java.beans.PropertyChangeSupport;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Paths;
import java.util.logging.FileHandler; import java.util.logging.FileHandler;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
@ -136,8 +135,7 @@ public class KeywordSearch {
Thread.sleep(2000); Thread.sleep(2000);
server.closeCore(); server.closeCore();
} catch (Exception ex) { } catch (Exception ex) {
String caseId = Paths.get(closedCase.getCaseDirectory(), closedCase.getName()).toString(); logger.log(Level.SEVERE, String.format("Failed to close core for %s", closedCase.getCaseDirectory()), ex); //NON-NLS
logger.log(Level.SEVERE, String.format("Failed to close core for %s", caseId), ex); //NON-NLS
if (RuntimeProperties.coreComponentsAreActive()) { if (RuntimeProperties.coreComponentsAreActive()) {
MessageNotifyUtil.Notify.error(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.closeCore.notification.msg"), ex.getMessage()); MessageNotifyUtil.Notify.error(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.closeCore.notification.msg"), ex.getMessage());
} }
@ -152,8 +150,7 @@ public class KeywordSearch {
try { try {
server.openCoreForCase(openedCase); server.openCoreForCase(openedCase);
} catch (Exception ex) { } catch (Exception ex) {
String caseId = Paths.get(openedCase.getCaseDirectory(), openedCase.getName()).toString(); logger.log(Level.SEVERE, String.format("Failed to open or create core for %s", openedCase.getCaseDirectory()), ex); //NON-NLS
logger.log(Level.SEVERE, String.format("Failed to open or create core for %s", caseId), ex); //NON-NLS
if (RuntimeProperties.coreComponentsAreActive()) { if (RuntimeProperties.coreComponentsAreActive()) {
MessageNotifyUtil.Notify.error(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.openCore.notification.msg"), ex.getMessage()); MessageNotifyUtil.Notify.error(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.openCore.notification.msg"), ex.getMessage());
} }