From 21b4ef1dab3812945af1183303f1f4f258a78ce8 Mon Sep 17 00:00:00 2001 From: ivmartel Date: Mon, 27 Mar 2023 15:48:30 +0200 Subject: [PATCH] Change error into warning and escape --- src/image/image.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/image/image.js b/src/image/image.js index 3427a0a584..11a74d3646 100644 --- a/src/image/image.js +++ b/src/image/image.js @@ -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