When to catch the Exception vs When to throw the Exceptions?
You should catch the exception when you are in the method that knows what to do. For example, forget about how it actually works for the moment, let’s say you are writing a library for opening and reading files. So you have a class, say: public class FileInputStream extends InputStream { public FileInputStream(String filename) { … Read more