SmileyChris / easy-thumbnails

Easy thumbnails for Django
http://easy-thumbnails.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
1.39k stars 319 forks source link

Report a file path of errored image #571

Open milonline-eu opened 3 years ago

milonline-eu commented 3 years ago

https://github.com/SmileyChris/easy-thumbnails/blob/410db9acc437e7d291083f39bb25fcfb0d80b819/easy_thumbnails/files.py#L386

When a file is not available it would be very nice to get the information what path/file is a problem. Something like: if self.file: raise exceptions.InvalidImageFormatError( "The source file does not appear to be an image".format(self.file.path)) else: raise exceptions.InvalidImageFormatError( "The source file does not appear to be an image")