From: Carl Hetherington Date: Fri, 13 May 2022 11:39:52 +0000 (+0200) Subject: Give a better error when guess_crop can't cope with a pixel format. X-Git-Tag: v2.16.12~8 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=c7013a2e1595447c9daa7b13f7a105721c409e2e;ds=sidebyside Give a better error when guess_crop can't cope with a pixel format. --- diff --git a/src/lib/guess_crop.cc b/src/lib/guess_crop.cc index 5deb0e480..7ee7a7286 100644 --- a/src/lib/guess_crop.cc +++ b/src/lib/guess_crop.cc @@ -62,7 +62,7 @@ guess_crop (shared_ptr image, double threshold) break; } default: - DCPOMATIC_ASSERT (false); + throw PixelFormatError("guess_crop()", image->pixel_format()); } return brightest > threshold;