Files
openide/java/java-impl/resources/inspectionDescriptions/BadExceptionDeclared.html
2025-02-05 04:43:28 +00:00

18 lines
778 B
HTML

<html>
<body>
Reports methods that declare an inappropriate exception in their <code>throws</code> clause.
For example an exception can be inappropriate because it is overly generic,
such as <code>java.lang.Exception</code> or <code>java.lang.Throwable</code>.
<p><b>Example:</b></p>
<pre><code>
void describeModule(String module) throws Exception {} // warning: Prohibited exception 'Exception' declared
</code></pre>
<!-- tooltip end -->
<p>Configure the inspection:</p>
<ul>
<li>Use the <b>Prohibited exceptions</b> list to specify which exceptions should be reported.</li>
<li>Use the <b>Ignore exceptions declared on methods overriding a library method</b> option to ignore exceptions declared by methods
that override a library method.</li>
</ul>
</body>
</html>