Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 447 Bytes

ExceptionExtendsError.md

File metadata and controls

20 lines (12 loc) · 447 Bytes

Pattern: Exception extends Error

Issue: -

Description

Errors are system exceptions. Do not extend them.

Examples:

class SomeError extends Error { }  // violation
class SomeError extends java.lang.Error { }  // violation

class SomeException extends Exception { }  // OK

Further Reading