<p>
<code>java.lang.Error</code> and its subclasses represent abnormal conditions, such as <code>OutOfMemoryError</code>, which should only be encountered by the Java Virtual Machine.
</p>

<p>The following code snippet:</p>

<pre>
public class MyException extends Error { /* ... */ }       // Non-Compliant
</pre>

<p>should be refactored into:</p>

<pre>
public class MyException extends Exception { /* ... */ }   // Compliant
</pre>