Merge pull request #21479 from Snuffleupagus/Annotation-#setOptionalContent-MissingDataException

Don't swallow `MissingDataException`s in the `Annotation.prototype.#setOptionalContent` method (PR 21313 follow-up)
This commit is contained in:
Tim van der Meij 2026-06-21 19:11:54 +02:00 committed by GitHub
commit 8ebc2382e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,6 +48,7 @@ import {
lookupMatrix, lookupMatrix,
lookupNormalRect, lookupNormalRect,
lookupRect, lookupRect,
MissingDataException,
numberToString, numberToString,
RESOURCES_KEYS_OPERATOR_LIST, RESOURCES_KEYS_OPERATOR_LIST,
RESOURCES_KEYS_TEXT_CONTENT, RESOURCES_KEYS_TEXT_CONTENT,
@ -1208,6 +1209,9 @@ class Annotation {
/* resources = */ null /* resources = */ null
); );
} catch (ex) { } catch (ex) {
if (ex instanceof MissingDataException) {
throw ex;
}
warn(`#setOptionalContent: ${ex}`); warn(`#setOptionalContent: ${ex}`);
} }
} }