Affects Version/s: 1.7
Fix Version/s: None
Environment:Operating System: Windows XP
TIFFImageEncoder uses Error to report unexpected conditions, e.g.
if(sampleSize != 1 && sampleSize == 4 &&
sampleSize != 8)
Using Error makes it hard to safely catch the exception, as there are some Errors that should not be caught (e.g. ThreadDeath)
The code should use a more specific Error, e.g. RuntimeException or IllegalArgumentException or InvalidParameterException.
There are over 70 classes where Error is thrown - please can these be changed to something more appropriate?