diff --git a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestPipeline.java b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestPipeline.java index 8e5fedbcf6..7bd84436d6 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestPipeline.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestPipeline.java @@ -24,6 +24,7 @@ import java.util.List; import java.util.logging.Level; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.Logger; +import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.datamodel.Content; /** @@ -110,6 +111,11 @@ final class DataSourceIngestPipeline { logger.log(Level.INFO, "{0} analysis of {1} (jobId={2}) finished", new Object[]{module.getDisplayName(), this.job.getDataSource().getName(), this.job.getDataSource().getId()}); } catch (Throwable ex) { // Catch-all exception firewall errors.add(new IngestModuleError(module.getDisplayName(), ex)); + String msg = ex.getMessage(); + // Jython run-time errors don't seem to have a message, but have details in toString. + if (msg == null) + msg = ex.toString(); + MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg); } if (this.job.isCancelled()) { break; diff --git a/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java b/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java index 78db0b482d..7fb43176fc 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/FileIngestPipeline.java @@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.ingest; import java.util.ArrayList; import java.util.Date; import java.util.List; +import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.datamodel.AbstractFile; /** @@ -119,6 +120,11 @@ final class FileIngestPipeline { module.process(file); } catch (Throwable ex) { // Catch-all exception firewall errors.add(new IngestModuleError(module.getDisplayName(), ex)); + String msg = ex.getMessage(); + // Jython run-time errors don't seem to have a message, but have details in toString. + if (msg == null) + msg = ex.toString(); + MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg); } if (this.job.isCancelled()) { break; @@ -144,6 +150,11 @@ final class FileIngestPipeline { module.shutDown(); } catch (Throwable ex) { // Catch-all exception firewall errors.add(new IngestModuleError(module.getDisplayName(), ex)); + String msg = ex.getMessage(); + // Jython run-time errors don't seem to have a message, but have details in toString. + if (msg == null) + msg = ex.toString(); + MessageNotifyUtil.Notify.error(module.getDisplayName() + " Error", msg); } } this.running = false; diff --git a/Core/src/org/sleuthkit/autopsy/python/Bundle.properties b/Core/src/org/sleuthkit/autopsy/python/Bundle.properties index 27d48af5ef..9016f7518a 100755 --- a/Core/src/org/sleuthkit/autopsy/python/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/python/Bundle.properties @@ -1,2 +1,2 @@ JythonModuleLoader.errorMessages.failedToOpenModule=Failed to open {0}. See log for details. -JythonModuleLoader.errorMessages.failedToLoadModule=Failed to load {0} from {1}. See log for details. \ No newline at end of file +JythonModuleLoader.errorMessages.failedToLoadModule=Failed to load {0}. {1}. See log for details. \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java b/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java index 860a2eaaa4..50e9895fd2 100755 --- a/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java +++ b/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java @@ -81,8 +81,9 @@ public final class JythonModuleLoader { objects.add( createObjectFromScript(script, className, interfaceClass)); } catch (Exception ex) { logger.log(Level.SEVERE, String.format("Failed to load %s from %s", className, script.getAbsolutePath()), ex); //NON-NLS + // NOTE: using ex.toString() because the current version is always returning null for ex.getMessage(). DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message( - NbBundle.getMessage(JythonModuleLoader.class, "JythonModuleLoader.errorMessages.failedToLoadModule", className, script.getAbsolutePath()), + NbBundle.getMessage(JythonModuleLoader.class, "JythonModuleLoader.errorMessages.failedToLoadModule", className, ex.toString()), NotifyDescriptor.ERROR_MESSAGE)); } }