If we are to catch specific forms of IOException
, or any other kind as a
matter of fact, and we only try and catch a couple (and define definitive outputs for t
The higher the exception hierarchy you're catching, and not handling them properly, or rethrowing, the more problems you will put under the carpet. You can have silent bugs that are hard to track.
So catch only appropriate Exceptions, and let the others pass. In the top level, you can have a catch all if you don't want to crash your program, but at least log it. Still this is questionable approach, because your application could be in inconsistent state, and you can do damage to your data.
But to answer directly to your question, IOException might be at the appropriate level. It could be enough to know for you that whatever the problem was, it related to IO, and you can act according to it. It's hard to say without more information.