You catch exceptions that you want to deal with specifically. Never catch
Exception,
RuntimeException,
Error or
Throwable unless you have a REALLY good reason to (such as preventing rogue plugins from crashing the rest of the application).
That means that most of the time, you only have to catch checked exceptions, which
you should try to do using the most specific type. If there are multiple disjoint exceptions that you want to handle the same way, use a disjoint catch clause: