Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
Issue #162
  • Loading branch information
rsoika committed Aug 28, 2022
1 parent ad312e2 commit c7625a3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,15 @@ public void saveSnapshot(ItemCollection snapshot) throws ArchiveException {
String snapshotID = snapshot.getUniqueID();

if (!isSnapshotID(snapshotID)) {
throw new IllegalArgumentException("unexpected '$snapshotid' format: '" + snapshotID + "'");
throw new ArchiveException(ArchiveException.INVALID_DOCUMENT_OBJECT,
"unexpected '$snapshotid' format: '" + snapshotID + "'");
}
if (debug) {
logger.finest("......save document" + snapshotID);
}
if (!snapshot.hasItem("$modified")) {
throw new IllegalArgumentException("missing item '$modified' for snapshot " + snapshotID);
throw new ArchiveException(ArchiveException.INVALID_DOCUMENT_OBJECT,
"missing item '$modified' for snapshot " + snapshotID);
}

// verify if this snapshot is already stored - if so, we do not overwrite
Expand Down

0 comments on commit c7625a3

Please sign in to comment.