try { // throws IOException } catch(Exception e) { } catch(IOException e) { }
when try block throws IOException, it wi
try
IOException
They are catched in the order you specify. In your case you should put IOException above Exception. Always keep Exception as last.
Exception