Offer hint to user to use --max-image-mpixels after decompression bob error

Closes #801
This commit is contained in:
James R. Barlow
2021-10-06 00:19:11 -07:00
parent 7bdd1828a9
commit 78f391536b
2 changed files with 12 additions and 6 deletions
+7
View File
@@ -414,6 +414,13 @@ def run_pipeline(options, *, plugin_manager, api=False):
else:
log.error(type(e).__name__)
return e.exit_code
except (PIL.Image.DecompressionBombError if not api else NeverRaise) as e:
log.exception(
"A decompression bomb error was encountered while executing the "
"pipeline. Use the argument --max-image-mpixels to raise the maximum "
"image pixel limit."
)
return ExitCode.other_error
except (Exception if not api else NeverRaise): # pylint: disable=broad-except
log.exception("An exception occurred while executing the pipeline")
return ExitCode.other_error