Checks for catching a Error . In most cases that is much too broad, and is also dangerous because it can catch exceptions such as ThreadDeath and OutOfMemoryError .
Checks for catching a Exception . In most cases that is too broad or general. It should usually be restricted to framework or infrastructure code, rather than application code.
Checks for catching a NullPointerException . Catching NullPointerException is never appropriate. It should be avoided in the first place with proper null checking, and it can mask underlying errors.
Checks for catching a RuntimeException . In most cases that is too broad or general. It should usually be restricted to framework or infrastructure code, rather than application code.
Checks for catching a Throwable . In most cases that is much too broad, and is also dangerous because it can catch exceptions such as ThreadDeath and OutOfMemoryError .
Checks for throwing an instance of java.lang.Error . This is not appropriate within normal application code. Throw an instance of a more specific exception subclass instead.
Checks for throwing an instance of java.lang.Exception . Throw an instance of a more specific exception subclass instead.
Checks for throwing an instance of java.lang.NullPointerException . Applications should never throw a NullPointerException .
Checks for throwing an instance of java.lang.RuntimeException . Throw an instance of a more specific exception subclass instead.
Checks for throwing an instance of java.lang.Throwable . Throw an instance of a more specific exception subclass instead.