mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
Java: improve inspection description
GitOrigin-RevId: 544591aeaaa7b94d29339efe75e9cccc18818a86
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4c48f8cfe7
commit
4505ed6de8
@@ -1,11 +1,24 @@
|
||||
<html>
|
||||
<body>
|
||||
Reports <code>throw</code> statements inside <code>finally</code>
|
||||
blocks.
|
||||
<p>While occasionally intended, such <code>throw</code> statements may conceal exceptions thrown from <code>try</code>-<code>catch</code> and thus
|
||||
tremendously complicate the debugging process.</p>
|
||||
Reports <code>throw</code> statements inside <code>finally</code> blocks.
|
||||
While occasionally intended, such <code>throw</code> statements can hide exceptions thrown from the <code>try</code> and
|
||||
<code>catch</code> blocks, thereby complicating the debugging process.
|
||||
<p><b>Example:</b></p>
|
||||
<pre><code>
|
||||
class Fascinating {
|
||||
void doTask(Task t) {
|
||||
try {
|
||||
t.activity();
|
||||
} finally {
|
||||
if (!t.finish()) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<!-- tooltip end -->
|
||||
<p>
|
||||
|
||||
<p>Use the <b>Warn everywhere declared exceptions may be thrown</b> option
|
||||
to warn on method calls to methods that declare exceptions as well.</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user