mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
catch IllegalStateException from Case.getCurrentCase() in TagsManager methods
This commit is contained in:
parent
f9f1c7db94
commit
8808496f83
@ -14,4 +14,8 @@ FileManager.addLocalDirInt2.exception.closed.msg=Attempted to use FileManager af
|
|||||||
TagsManager.addContentTag.exception.beginByteOffsetOOR.msg=beginByteOffset \= {0} out of content size range (0 - {1})
|
TagsManager.addContentTag.exception.beginByteOffsetOOR.msg=beginByteOffset \= {0} out of content size range (0 - {1})
|
||||||
TagsManager.addContentTag.exception.endByteOffsetOOR.msg=endByteOffset \= {0} out of content size range (0 - {1})
|
TagsManager.addContentTag.exception.endByteOffsetOOR.msg=endByteOffset \= {0} out of content size range (0 - {1})
|
||||||
TagsManager.addContentTag.exception.endLTbegin.msg=endByteOffset < beginByteOffset
|
TagsManager.addContentTag.exception.endLTbegin.msg=endByteOffset < beginByteOffset
|
||||||
TagsManager.predefTagNames.bookmark.text=Bookmark
|
TagsManager.predefTagNames.bookmark.text=Bookmark
|
||||||
|
TagsManager.addContentTag.noCaseWarning=Failed to add publish new content tag event. There is no case open.
|
||||||
|
TagsManager.deleteContentTag.noCaseWarning=Failed to add publish content tag deleted event. There is no case open.
|
||||||
|
TagsManager.addBlackboardArtifactTag.noCaseWarning=Failed to add publish new blackboard artifact tag event. There is no case open.
|
||||||
|
TagsManager.deleteBlackboardArtifactTag.noCaseWarning=Failed to add publish blackboard artifact tag deleted event. There is no case open.
|
||||||
|
@ -248,7 +248,11 @@ public class TagsManager implements Closeable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
final ContentTag newContentTag = tskCase.addContentTag(content, tagName, comment, beginByteOffset, endByteOffset);
|
final ContentTag newContentTag = tskCase.addContentTag(content, tagName, comment, beginByteOffset, endByteOffset);
|
||||||
Case.getCurrentCase().notifyContentTagAdded(newContentTag);
|
try {
|
||||||
|
Case.getCurrentCase().notifyContentTagAdded(newContentTag);
|
||||||
|
} catch (IllegalArgumentException ex) {
|
||||||
|
Logger.getLogger(TagsManager.class.getName()).log(Level.WARNING, NbBundle.getMessage(TagsManager.class, "TagsManager.addContentTag.noCaseWarning"));
|
||||||
|
}
|
||||||
return newContentTag;
|
return newContentTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,7 +270,11 @@ public class TagsManager implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tskCase.deleteContentTag(tag);
|
tskCase.deleteContentTag(tag);
|
||||||
Case.getCurrentCase().notifyContentTagDeleted(tag);
|
try {
|
||||||
|
Case.getCurrentCase().notifyContentTagDeleted(tag);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
Logger.getLogger(TagsManager.class.getName()).log(Level.WARNING, NbBundle.getMessage(TagsManager.class, "TagsManager.deleteContentTag.noCaseWarning"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -375,7 +383,11 @@ public class TagsManager implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BlackboardArtifactTag addBlackboardArtifactTag = tskCase.addBlackboardArtifactTag(artifact, tagName, comment);
|
BlackboardArtifactTag addBlackboardArtifactTag = tskCase.addBlackboardArtifactTag(artifact, tagName, comment);
|
||||||
Case.getCurrentCase().notifyBlackBoardArtifactTagAdded(addBlackboardArtifactTag);
|
try {
|
||||||
|
Case.getCurrentCase().notifyBlackBoardArtifactTagAdded(addBlackboardArtifactTag);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
Logger.getLogger(TagsManager.class.getName()).log(Level.WARNING, NbBundle.getMessage(TagsManager.class, "TagsManager.addBlackboardArtifactTag.noCaseWarning"));
|
||||||
|
}
|
||||||
return addBlackboardArtifactTag;
|
return addBlackboardArtifactTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -393,7 +405,11 @@ public class TagsManager implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tskCase.deleteBlackboardArtifactTag(tag);
|
tskCase.deleteBlackboardArtifactTag(tag);
|
||||||
Case.getCurrentCase().notifyBlackBoardArtifactTagDeleted(tag);
|
try {
|
||||||
|
Case.getCurrentCase().notifyBlackBoardArtifactTagDeleted(tag);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
Logger.getLogger(TagsManager.class.getName()).log(Level.WARNING, NbBundle.getMessage(TagsManager.class, "TagsManager.deleteBlackboardArtifactTag.noCaseWarning"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user