mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-08 14:19:32 +00:00
Merge pull request #3786 from sleuthkit/supress_stacktrace
remove stack traces from log that are occuring during regression tests
This commit is contained in:
commit
add87b03eb
@ -253,7 +253,7 @@ final public class FiltersPanel extends JPanel {
|
||||
});
|
||||
}
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
logger.log(Level.WARNING, "Communications Visualization Tool opened with no open case.", ex);
|
||||
logger.log(Level.INFO, "Filter update cancelled. Case is closed.");
|
||||
} catch (TskCoreException tskCoreException) {
|
||||
logger.log(Level.SEVERE, "There was a error loading the datasources for the case.", tskCoreException);
|
||||
}
|
||||
|
@ -657,6 +657,7 @@ public final class ImageGalleryController {
|
||||
@NbBundle.Messages({"BulkTask.committingDb.status=committing image/video database",
|
||||
"BulkTask.stopCopy.status=Stopping copy to drawable db task.",
|
||||
"BulkTask.errPopulating.errMsg=There was an error populating Image Gallery database."})
|
||||
/* Base abstract class for various methods of copying data into the Image gallery DB */
|
||||
abstract static private class BulkTransferTask extends BackgroundTask {
|
||||
|
||||
static private final String FILE_EXTENSION_CLAUSE =
|
||||
@ -689,6 +690,10 @@ public final class ImageGalleryController {
|
||||
this.tskCase = tskCase;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param success true if the transfer was successful
|
||||
*/
|
||||
abstract void cleanup(boolean success);
|
||||
|
||||
abstract List<AbstractFile> getFiles() throws TskCoreException;
|
||||
|
@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.imagegallery;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.channels.ClosedByInterruptException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
@ -199,7 +200,12 @@ class PerCaseProperties {
|
||||
try (OutputStream fos = Files.newOutputStream(getPropertyPath(moduleName))) {
|
||||
props.store(fos, "Changed config settings(batch)"); //NON-NLS
|
||||
}
|
||||
} catch (IOException e) {
|
||||
}
|
||||
catch (ClosedByInterruptException e) {
|
||||
// not logging exception because this often happens when case is closed and stack does not help with debugging
|
||||
Logger.getLogger(PerCaseProperties.class.getName()).log(Level.WARNING, "Properties not saved because of interrupt"); //NON-NLS
|
||||
}
|
||||
catch (IOException e) {
|
||||
Logger.getLogger(PerCaseProperties.class.getName()).log(Level.WARNING, "Property file exists for [" + moduleName + "] at [" + getPropertyPath(moduleName) + "] but could not be loaded.", e); //NON-NLS NON-NLS NON-NLS
|
||||
}
|
||||
}
|
||||
@ -225,7 +231,12 @@ class PerCaseProperties {
|
||||
try (OutputStream fos = Files.newOutputStream(getPropertyPath(moduleName))) {
|
||||
props.store(fos, "Changed config settings(single)"); //NON-NLS
|
||||
}
|
||||
} catch (IOException e) {
|
||||
}
|
||||
catch (ClosedByInterruptException e) {
|
||||
// not logging exception because this often happens when case is closed and stack does not help with debugging
|
||||
Logger.getLogger(PerCaseProperties.class.getName()).log(Level.WARNING, "Property {0} not saved because of interrupt", settingName); //NON-NLS
|
||||
}
|
||||
catch (IOException e) {
|
||||
Logger.getLogger(PerCaseProperties.class.getName()).log(Level.WARNING, "Property file exists for [" + moduleName + "] at [" + getPropertyPath(moduleName) + "] but could not be loaded.", e); //NON-NLS NON-NLS NON-NLS
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ import javafx.scene.layout.Pane;
|
||||
import javafx.scene.text.Text;
|
||||
import org.controlsfx.control.PopOver;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.imagegallery.FXMLConstructor;
|
||||
import org.sleuthkit.autopsy.imagegallery.ImageGalleryController;
|
||||
@ -144,7 +145,13 @@ public class Toolbar extends ToolBar {
|
||||
*
|
||||
* TODO (JIRA-3010): SEVERE error logged by image Gallery UI
|
||||
*/
|
||||
LOGGER.log(Level.WARNING, "Could not create Follow Up tag menu item", ex); //NON-NLS
|
||||
if (Case.isCaseOpen()) {
|
||||
LOGGER.log(Level.WARNING, "Could not create Follow Up tag menu item", ex); //NON-NLS
|
||||
}
|
||||
else {
|
||||
// don't add stack trace to log because it makes looking for real errors harder
|
||||
LOGGER.log(Level.INFO, "Unable to get tag name. Case is closed."); //NON-NLS
|
||||
}
|
||||
}
|
||||
tagGroupMenuButton.showingProperty().addListener(showing -> {
|
||||
if (tagGroupMenuButton.isShowing()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user