Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Errors should not be caught or handled (except in the rarest of cases). Exceptions are the bread and butter of exception handling. The <a href="http://java.sun.com/javase/6/docs/api/java/lang/Error.html" rel="noreferrer">Javadoc</a> explains it well:</p> <blockquote> <p>An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions.</p> </blockquote> <p>Look at a few of the subclasses of <code>Error</code>, taking some of their JavaDoc comments:</p> <ul> <li><code>AnnotationFormatError</code> - Thrown when the annotation parser attempts to read an annotation from a class file and determines that the annotation is malformed.</li> <li><code>AssertionError</code> - Thrown to indicate that an assertion has failed.</li> <li><code>LinkageError</code> - Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class. </li> <li><code>VirtualMachineError</code> - Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating. </li> </ul> <p>There are really three important subcategories of <code>Throwable</code>:</p> <ul> <li><code>Error</code> - Something severe enough has gone wrong the most applications should crash rather than try to handle the problem,</li> <li>Unchecked Exception (aka <code>RuntimeException</code>) - Very often a programming error such as a <code>NullPointerException</code> or an illegal argument. Applications can sometimes handle or recover from this <code>Throwable</code> category -- or at least catch it at the Thread's <code>run()</code> method, log the complaint, and continue running.</li> <li>Checked Exception (aka Everything else) - Applications are expected to be able to catch and meaningfully do something with the rest, such as <code>FileNotFoundException</code> and <code>TimeoutException</code>...</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload