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) {
|
void setErrors(final String errors, boolean critical) {
|
||||||
progressLabel.setText("*Image added (non-critical image errors encountered). Click below to view the Add Image Log.");
|
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 = new JButton();
|
||||||
errorButton.setText("View Log");
|
errorButton.setText("View Log");
|
||||||
infoPanel.add(errorButton);
|
infoPanel.add(errorButton);
|
||||||
|
@ -318,20 +318,13 @@ class AddImageWizardPanel2 implements WizardDescriptor.Panel<WizardDescriptor> {
|
|||||||
revert();
|
revert();
|
||||||
if (hasCritError) {
|
if (hasCritError) {
|
||||||
//core error
|
//core error
|
||||||
StringBuilder errMsgB = new StringBuilder();
|
getComponent().setErrors(errorString, true);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} else if (errorString != null) {
|
} else if (errorString != null) {
|
||||||
//data error (non-critical)
|
//data error (non-critical)
|
||||||
logger.log(Level.INFO, "Handling non-critical errors that occured in add image process");
|
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