mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-27 01:42:17 +07:00
GitOrigin-RevId: 56876a5dd073a06c3fcc92f63ed1f5674830bc25
27 lines
626 B
HTML
27 lines
626 B
HTML
<html>
|
|
<body>
|
|
<p>Reports cases when <code>except</code> clauses are not in the proper order,
|
|
from the more specific to the more generic, or one exception class is caught twice. </p>
|
|
<p>
|
|
If you do not fix the order, some exceptions may not be caught by the most specific handler.
|
|
</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
try:
|
|
call()
|
|
except ValueError:
|
|
pass
|
|
except UnicodeError:
|
|
pass
|
|
</code></pre>
|
|
<p>The IDE recommends moving the clause up. When the quick-fix is applied, the code changes to:</p>
|
|
<pre><code>
|
|
try:
|
|
call()
|
|
except UnicodeError:
|
|
pass
|
|
except ValueError:
|
|
pass
|
|
</code></pre>
|
|
</body>
|
|
</html> |