mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
Review: https://jetbrains.team/p/ij/reviews/98339 It's a concrete quick-fix GitOrigin-RevId: 3388021f0cde4cb49f8c447361c0d8b2fd08cafd
32 lines
882 B
HTML
32 lines
882 B
HTML
<html>
|
|
<body>
|
|
Reports <code>catch</code> blocks that are empty or may ignore an exception.
|
|
<p>While occasionally intended, empty <code>catch</code> blocks may complicate debugging.
|
|
Also, ignoring a <code>catch</code> parameter might be wrong.</p>
|
|
|
|
<p>
|
|
The inspection won't report any <code>catch</code> parameters named <code>ignore</code>, <code>ignored</code>, or <code>_</code>.
|
|
</p>
|
|
<p>
|
|
You can use the quick-fix to change the exception name to <code>_</code>.
|
|
</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
try {
|
|
throwingMethod()
|
|
} catch (ex: IOException) {
|
|
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
try {
|
|
throwingMethod()
|
|
} catch (_: IOException) {
|
|
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
Use the <b>Do not warn when 'catch' block contains a comment</b> option to ignore <code>catch</code> blocks with comments.
|
|
</body>
|
|
</html> |