Browse Source

Exceptions

pull/99/head
Jure Šorn 3 years ago
parent
commit
316e0405c3
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -1356,7 +1356,7 @@ else:
finally: finally:
<code_3> <code_3>
``` ```
* **Code inside the `'else'` block will only be executed if `'try'` block had no exception.**
* **Code inside the `'else'` block will only be executed if `'try'` block had no exceptions.**
* **Code inside the `'finally'` block will always be executed.** * **Code inside the `'finally'` block will always be executed.**
### Catching Exceptions ### Catching Exceptions

2
index.html

@ -1312,7 +1312,7 @@ LogicOp = Enum(<span class="hljs-string">'LogicOp'</span>, {<span class="hljs-st
</code></pre></div> </code></pre></div>
<ul> <ul>
<li><strong>Code inside the <code class="python hljs"><span class="hljs-string">'else'</span></code> block will only be executed if <code class="python hljs"><span class="hljs-string">'try'</span></code> block had no exception.</strong></li>
<li><strong>Code inside the <code class="python hljs"><span class="hljs-string">'else'</span></code> block will only be executed if <code class="python hljs"><span class="hljs-string">'try'</span></code> block had no exceptions.</strong></li>
<li><strong>Code inside the <code class="python hljs"><span class="hljs-string">'finally'</span></code> block will always be executed.</strong></li> <li><strong>Code inside the <code class="python hljs"><span class="hljs-string">'finally'</span></code> block will always be executed.</strong></li>
</ul> </ul>
<div><h3 id="catchingexceptions">Catching Exceptions</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">except</span> &lt;exception&gt;: <div><h3 id="catchingexceptions">Catching Exceptions</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">except</span> &lt;exception&gt;:

Loading…
Cancel
Save