Include image location in 'bad image' exception messages
When there is a bad image in the report, the exception message does not show the URL of the bad image, which makes it extremely difficult to troubleshoot. This takes us hours and hours to troubleshoot a customers report, whereas if we had the URL of the offending image, we could cut that down to minutes.
Instead, this is what we get:
net.windward.env.DataSourceException: ReadBitmapHeader error; call exception getters for additional information
The underlying exception is:
Caused by: org.apache.commons.imaging.ImageReadException: Couldn't read magic numbers to guess format.
at org.apache.commons.imaging.Imaging.guessFormat(Imaging.java:268) ~[commons-imaging-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
at org.apache.commons.imaging.Imaging.getImageParser(Imaging.java:738) ~[commons-imaging-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
at org.apache.commons.imaging.Imaging.getImageInfo(Imaging.java:731) ~[commons-imaging-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
at org.apache.commons.imaging.Imaging.getImageInfo(Imaging.java:665) ~[commons-imaging-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
at net.windward.env.image.ImageHandler._readBitmapHeader(Unknown Source) ~[WindwardReports-14.0.236.1.1.jar:?]
at net.windward.env.image.ImageHandler.readBitmapHeader(Unknown Source) ~[WindwardReports-14.0.236.1.1.jar:?]
at net.windward.env.image.ImageHandler.readBitmapHeader(Unknown Source) ~[WindwardReports-14.0.236.1.1.jar:?]
Not useful.

Hello Reporter,
I am happy to report that this information should be added in the exception in our recent 20.0 release. Please let us know if you have any problems with the 20.0 exception for your image paths.
Thank you for your idea.
Adam Austin
Product Manager
-
Michael Bjerregaard-Pedersen commented
I have experienced problems like this also. I would suggest that a missing image file, locked pdf or invalid file does not throw an expection, but instead just inserts the url/name of the offending file into the report being generated.