From b2e84e9ae13948ac30152b5ca016232deb7c1b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Wed, 31 May 2023 07:26:41 +0200 Subject: [PATCH] Exceptions --- README.md | 8 ++++---- index.html | 12 ++++++------ parse.js | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 62e04f5..5b0f587 100644 --- a/README.md +++ b/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 ` 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: diff --git a/index.html b/index.html index 73f328a..b46d1b9 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -1237,8 +1237,7 @@ error_msg = ''.join(traceback.format_exception( ├── 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. @@ -1248,13 +1247,14 @@ error_msg = ''.join(traceback.format_exception( ├── 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:

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