Fixed blackboard to handle new exception when adding artifact types

This commit is contained in:
Oliver Spohngellert 2016-01-28 10:35:56 -05:00
parent 7d9e36f4c6
commit 646f7199b1

View File

@ -67,7 +67,7 @@ public final class Blackboard implements Closeable {
public BlackboardArtifact.Type addArtifactType(String typeName, String displayName) throws BlackboardException { public BlackboardArtifact.Type addArtifactType(String typeName, String displayName) throws BlackboardException {
try { try {
return Case.getCurrentCase().getSleuthkitCase().addBlackboardArtifactType(typeName, displayName); return Case.getCurrentCase().getSleuthkitCase().addBlackboardArtifactType(typeName, displayName);
} catch (TskCoreException ex) { } catch (TskCoreException | TskDataException ex) {
throw new BlackboardException("New artifact type could not be added", ex); throw new BlackboardException("New artifact type could not be added", ex);
} }
} }
@ -85,9 +85,9 @@ public final class Blackboard implements Closeable {
try { try {
return Case.getCurrentCase().getSleuthkitCase().addArtifactAttributeType(attrTypeString, valueType, displayName); return Case.getCurrentCase().getSleuthkitCase().addArtifactAttributeType(attrTypeString, valueType, displayName);
} catch (TskDataException ex) { } catch (TskDataException ex) {
throw new BlackboardException("New artifact type could not be added", ex); throw new BlackboardException("New attribute type could not be added", ex);
} catch (TskCoreException ex) { } catch (TskCoreException ex) {
throw new BlackboardException("New artifact type could not be added", ex); throw new BlackboardException("New attribute type could not be added", ex);
} }
} }