Browse Source

Exceptions

pull/109/merge
Jure Šorn 1 year ago
parent
commit
b2e84e9ae1
3 changed files with 15 additions and 15 deletions
  1. 8
      README.md
  2. 12
      index.html
  3. 10
      parse.js

8
README.md

@ -1447,8 +1447,7 @@ BaseException
+-- SystemExit # Raised by the sys.exit() function.
+-- KeyboardInterrupt # Raised when the user hits the interrupt key (ctrl-c).
+-- Exception # User-defined exceptions should be derived from this class.
+-- ArithmeticError # Base class for arithmetic errors.
| +-- ZeroDivisionError # Raised when dividing by zero.
+-- ArithmeticError # Base class for arithmetic errors such as ZeroDivisionError.
+-- AssertionError # Raised by `assert <exp>` if expression returns false value.
+-- AttributeError # Raised when object doesn't have requested attribute/method.
+-- EOFError # Raised by input() when it hits an end-of-file condition.
@ -1458,13 +1457,14 @@ BaseException
+-- MemoryError # Out of memory. Could be too late to start deleting vars.
+-- NameError # Raised when nonexistent name (variable/func/class) is used.
| +-- UnboundLocalError # Raised when local name is used before it's being defined.
+-- OSError # Errors such as FileExistsError/PermissionError (see Open).
+-- OSError # Errors such as FileExistsError/PermissionError (see #Open).
| +-- ConnectionError # Errors such as BrokenPipeError/ConnectionAbortedError.
+-- RuntimeError # Raised by errors that don't fall into other categories.
| +-- NotImplementedErr # Can be raised by abstract methods or by unfinished code.
| +-- RecursionError # Raised when the maximum recursion depth is exceeded.
+-- StopIteration # Raised by next() when run on an empty iterator.
+-- TypeError # Raised when an argument is of the wrong type.
+-- ValueError # When argument has the right type but inappropriate value.
+-- UnicodeError # Raised when encoding/decoding strings to/from bytes fails.
```
#### Collections and their exceptions:

12
index.html

@ -54,7 +54,7 @@
<body>
<header>
<aside>May 27, 2023</aside>
<aside>May 31, 2023</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</header>
@ -1237,8 +1237,7 @@ error_msg = <span class="hljs-string">''</span>.join(traceback.format_exception(
├── SystemExit <span class="hljs-comment"># Raised by the sys.exit() function.</span>
├── KeyboardInterrupt <span class="hljs-comment"># Raised when the user hits the interrupt key (ctrl-c).</span>
└── Exception <span class="hljs-comment"># User-defined exceptions should be derived from this class.</span>
├── ArithmeticError <span class="hljs-comment"># Base class for arithmetic errors.</span>
│ └── ZeroDivisionError <span class="hljs-comment"># Raised when dividing by zero.</span>
├── ArithmeticError <span class="hljs-comment"># Base class for arithmetic errors such as ZeroDivisionError.</span>
├── AssertionError <span class="hljs-comment"># Raised by `assert &lt;exp&gt;` if expression returns false value.</span>
├── AttributeError <span class="hljs-comment"># Raised when object doesn't have requested attribute/method.</span>
├── EOFError <span class="hljs-comment"># Raised by input() when it hits an end-of-file condition.</span>
@ -1248,13 +1247,14 @@ error_msg = <span class="hljs-string">''</span>.join(traceback.format_exception(
├── MemoryError <span class="hljs-comment"># Out of memory. Could be too late to start deleting vars.</span>
├── NameError <span class="hljs-comment"># Raised when nonexistent name (variable/func/class) is used.</span>
│ └── UnboundLocalError <span class="hljs-comment"># Raised when local name is used before it's being defined.</span>
├── OSError <span class="hljs-comment"># Errors such as FileExistsError/PermissionError (see Open).</span>
├── OSError <span class="hljs-comment"># Errors such as FileExistsError/PermissionError (see #Open).</span>
│ └── ConnectionError <span class="hljs-comment"># Errors such as BrokenPipeError/ConnectionAbortedError.</span>
├── RuntimeError <span class="hljs-comment"># Raised by errors that don't fall into other categories.</span>
│ ├── NotImplementedErr <span class="hljs-comment"># Can be raised by abstract methods or by unfinished code.</span>
│ └── RecursionError <span class="hljs-comment"># Raised when the maximum recursion depth is exceeded.</span>
├── StopIteration <span class="hljs-comment"># Raised by next() when run on an empty iterator.</span>
├── TypeError <span class="hljs-comment"># Raised when an argument is of the wrong type.</span>
└── ValueError <span class="hljs-comment"># When argument has the right type but inappropriate value.</span>
└── UnicodeError <span class="hljs-comment"># Raised when encoding/decoding strings to/from bytes fails.</span>
</code></pre></div>
<div><h4 id="collectionsandtheirexceptions">Collections and their exceptions:</h4><pre><code class="text language-text">┏━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┓
@ -2935,7 +2935,7 @@ $ pyinstaller script.py --add-data '&lt;path&gt;:.' <span class="hljs-comment">
<footer>
<aside>May 27, 2023</aside>
<aside>May 31, 2023</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</footer>

10
parse.js

@ -407,8 +407,7 @@ const DIAGRAM_7_B =
" ├── SystemExit <span class='hljs-comment'># Raised by the sys.exit() function.</span>\n" +
" ├── KeyboardInterrupt <span class='hljs-comment'># Raised when the user hits the interrupt key (ctrl-c).</span>\n" +
" └── Exception <span class='hljs-comment'># User-defined exceptions should be derived from this class.</span>\n" +
" ├── ArithmeticError <span class='hljs-comment'># Base class for arithmetic errors.</span>\n" +
" │ └── ZeroDivisionError <span class='hljs-comment'># Raised when dividing by zero.</span>\n" +
" ├── ArithmeticError <span class='hljs-comment'># Base class for arithmetic errors such as ZeroDivisionError.</span>\n" +
" ├── AssertionError <span class='hljs-comment'># Raised by `assert &lt;exp&gt;` if expression returns false value.</span>\n" +
" ├── AttributeError <span class='hljs-comment'># Raised when object doesn't have requested attribute/method.</span>\n" +
" ├── EOFError <span class='hljs-comment'># Raised by input() when it hits an end-of-file condition.</span>\n" +
@ -418,13 +417,14 @@ const DIAGRAM_7_B =
" ├── MemoryError <span class='hljs-comment'># Out of memory. Could be too late to start deleting vars.</span>\n" +
" ├── NameError <span class='hljs-comment'># Raised when nonexistent name (variable/func/class) is used.</span>\n" +
" │ └── UnboundLocalError <span class='hljs-comment'># Raised when local name is used before it's being defined.</span>\n" +
" ├── OSError <span class='hljs-comment'># Errors such as FileExistsError/PermissionError (see Open).</span>\n" +
" ├── OSError <span class='hljs-comment'># Errors such as FileExistsError/PermissionError (see #Open).</span>\n" +
" │ └── ConnectionError <span class='hljs-comment'># Errors such as BrokenPipeError/ConnectionAbortedError.</span>\n" +
" ├── RuntimeError <span class='hljs-comment'># Raised by errors that don't fall into other categories.</span>\n" +
" │ ├── NotImplementedErr <span class='hljs-comment'># Can be raised by abstract methods or by unfinished code.</span>\n" +
" │ └── RecursionError <span class='hljs-comment'># Raised when the maximum recursion depth is exceeded.</span>\n" +
" ├── StopIteration <span class='hljs-comment'># Raised by next() when run on an empty iterator.</span>\n" +
" ├── TypeError <span class='hljs-comment'># Raised when an argument is of the wrong type.</span>\n" +
" └── ValueError <span class='hljs-comment'># When argument has the right type but inappropriate value.</span>\n" +
" └── UnicodeError <span class='hljs-comment'># Raised when encoding/decoding strings to/from bytes fails.</span>\n";
" └── ValueError <span class='hljs-comment'># When argument has the right type but inappropriate value.</span>\n";
const DIAGRAM_8_A =
'+-----------+------------+------------+------------+\n' +

Loading…
Cancel
Save