Java

Java

Made by DeepSource

Class is not an Exception/Throwable, even though it is named as such JAVA-S0182

Anti-pattern
Minor

This class is not an exception, and does not extend Throwable or any other exception class, but ends with 'Exception'. This may be confusing to users of this class.

Examples

Bad Practice

class HandleException {
    // ... some code to do with handling exceptions?
}

Recommended

Consider renaming the class to be less confusing:

class ExceptionHandler {
    // ...
}

References