Can anyone help me out how to catch both IOException and IIOException, because i need to differentiate image format and image load error.
Something like this is not working because i am not catching IOException.
catch (IIOException e)
{
System.out.println("Invalid image format: " + e.getMessage());
Throwable t = e.getCause();
if ((t != null) && (t instanceof IOException)) {
System.out.println("Unable to load image: " + e.getMessage());
}
}