Skip to content

Commit

Permalink
Change error into warning and escape
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Mar 27, 2023
1 parent 3aaf3da commit 21b4ef1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,9 @@ dwv.image.Image = function (geometry, buffer, imageUids) {
}
// append
if (frameIndex >= meta.numberOfFiles) {
throw new Error(
'Cannot append a frame at an index above the number of frames');
dwv.logger.warn('Ignoring frame at index ' + frameIndex +
' (size: ' + meta.numberOfFiles + ')');
return;
}
buffer.set(frameBuffer, frameSize * frameIndex);
// update geometry
Expand Down

0 comments on commit 21b4ef1

Please sign in to comment.