mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 19:14:55 +00:00
Merge pull request #669 from rcordovano/improved_pipeline_start_error_msg
Improve ingest module start up error message box
This commit is contained in:
commit
97a6944de1
@ -395,28 +395,23 @@ public class IngestManager {
|
|||||||
List<IngestModuleError> errors = ingestJob.startUpIngestPipelines();
|
List<IngestModuleError> errors = ingestJob.startUpIngestPipelines();
|
||||||
if (!errors.isEmpty()) {
|
if (!errors.isEmpty()) {
|
||||||
// Report the error to the user.
|
// Report the error to the user.
|
||||||
StringBuilder failedModules = new StringBuilder();
|
StringBuilder moduleStartUpErrors = new StringBuilder();
|
||||||
StringBuilder errorMessages = new StringBuilder();
|
for (IngestModuleError error : errors) {
|
||||||
for (int i = 0; i < errors.size(); ++i) {
|
|
||||||
IngestModuleError error = errors.get(i);
|
|
||||||
String moduleName = error.getModuleDisplayName();
|
String moduleName = error.getModuleDisplayName();
|
||||||
logger.log(Level.SEVERE, "The " + moduleName + " module failed to start up", error.getModuleError()); //NON-NLS
|
logger.log(Level.SEVERE, "The " + moduleName + " module failed to start up", error.getModuleError()); //NON-NLS
|
||||||
failedModules.append(moduleName);
|
moduleStartUpErrors.append(moduleName);
|
||||||
errorMessages.append(error.getModuleError().getMessage());
|
moduleStartUpErrors.append(": ");
|
||||||
if ((errors.size() > 1) && (i != (errors.size() - 1))) {
|
moduleStartUpErrors.append(error.getModuleError().getLocalizedMessage());
|
||||||
failedModules.append(",");
|
moduleStartUpErrors.append("\n");
|
||||||
errorMessages.append("\n\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
StringBuilder notifyMessage = new StringBuilder();
|
StringBuilder notifyMessage = new StringBuilder();
|
||||||
notifyMessage.append("Failed to start the following ingest modules: ");
|
notifyMessage.append("Unable to start up one or more ingest modules, ingest job cancelled.\n");
|
||||||
notifyMessage.append(failedModules.toString());
|
notifyMessage.append("Please disable the failed modules or fix the errors and then restart ingest\n");
|
||||||
notifyMessage.append(".\n\nNo ingest modules will be run. Please disable the failed modules ");
|
notifyMessage.append("by right clicking on the data source and selecting Run Ingest Modules.\n");
|
||||||
notifyMessage.append("or fix the error and restart ingest by right clicking on ");
|
notifyMessage.append("Errors:\n\n");
|
||||||
notifyMessage.append("the data source and selecting Run Ingest Modules.\n\n");
|
notifyMessage.append(moduleStartUpErrors.toString());
|
||||||
notifyMessage.append("Errors\n\n: ");
|
notifyMessage.append("\n\n");
|
||||||
notifyMessage.append(errorMessages.toString());
|
JOptionPane.showMessageDialog(null, notifyMessage.toString(), "Ingest Failure", JOptionPane.ERROR_MESSAGE);
|
||||||
JOptionPane.showMessageDialog(null, notifyMessage.toString(), "Ingest Module Start Up Failed", JOptionPane.ERROR_MESSAGE);
|
|
||||||
|
|
||||||
// Jettison the ingest job and move on to the next one.
|
// Jettison the ingest job and move on to the next one.
|
||||||
synchronized (IngestManager.this) {
|
synchronized (IngestManager.this) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user