Merge pull request #14628 from Snuffleupagus/issue-14626
When `stopAtErrors` is set, throw rather than warn when exceeding `maxImageSize` (issue 14626)
This commit is contained in:
commit
5242c38af5
@ -576,8 +576,13 @@ class PartialEvaluator {
|
||||
}
|
||||
const maxImageSize = this.options.maxImageSize;
|
||||
if (maxImageSize !== -1 && w * h > maxImageSize) {
|
||||
warn("Image exceeded maximum allowed size and was removed.");
|
||||
return;
|
||||
const msg = "Image exceeded maximum allowed size and was removed.";
|
||||
|
||||
if (this.options.ignoreErrors) {
|
||||
warn(msg);
|
||||
return;
|
||||
}
|
||||
throw new Error(msg);
|
||||
}
|
||||
|
||||
let optionalContent;
|
||||
|
Loading…
Reference in New Issue
Block a user