mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Show error log for critical add image errors too
This commit is contained in:
parent
7211e619c9
commit
764f4cea39
@ -98,8 +98,13 @@ final class AddImageVisualPanel2 extends JPanel {
|
||||
|
||||
|
||||
|
||||
void setNonCriticalErrors(final String errors) {
|
||||
progressLabel.setText("*Image added (non-critical image errors encountered). Click below to view the Add Image Log.");
|
||||
void setErrors(final String errors, boolean critical) {
|
||||
if (critical) {
|
||||
progressLabel.setText("*Failed to add image (critical errors encountered). Click below to view the Add Image Log.");
|
||||
}
|
||||
else {
|
||||
progressLabel.setText("*Image added (non-critical image errors encountered). Click below to view the Add Image Log.");
|
||||
}
|
||||
errorButton = new JButton();
|
||||
errorButton.setText("View Log");
|
||||
infoPanel.add(errorButton);
|
||||
|
@ -318,20 +318,13 @@ class AddImageWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
||||
revert();
|
||||
if (hasCritError) {
|
||||
//core error
|
||||
StringBuilder errMsgB = new StringBuilder();
|
||||
errMsgB.append("<html>*Failed to add image");
|
||||
if (errorString != null) {
|
||||
errMsgB.append(": <br />").append(errorString);
|
||||
}
|
||||
errMsgB.append("</html>");
|
||||
getComponent().changeProgressBarTextAndColor(errMsgB.toString(), 0, Color.black);
|
||||
getComponent().setErrors(errorString, true);
|
||||
}
|
||||
|
||||
return;
|
||||
} else if (errorString != null) {
|
||||
//data error (non-critical)
|
||||
logger.log(Level.INFO, "Handling non-critical errors that occured in add image process");
|
||||
getComponent().setNonCriticalErrors(errorString);
|
||||
getComponent().setErrors(errorString, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user