summaryrefslogtreecommitdiff
path: root/misc/errorExample.py
diff options
context:
space:
mode:
Diffstat (limited to 'misc/errorExample.py')
-rw-r--r--misc/errorExample.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/misc/errorExample.py b/misc/errorExample.py
new file mode 100644
index 0000000..fe610e6
--- /dev/null
+++ b/misc/errorExample.py
@@ -0,0 +1,11 @@
+#!python3
+
+#Chapter 10 Error Example
+
+def spam():
+ bacon()
+
+def bacon():
+ raise Exception('This is the error message')
+
+spam()