Added a future folder to examples
[fur] / examples / future / 33_except.fur
diff --git a/examples/future/33_except.fur b/examples/future/33_except.fur
new file mode 100644 (file)
index 0000000..76e900c
--- /dev/null
@@ -0,0 +1,13 @@
+def throws() do
+  try
+    42 // 0
+  except(DivisionByZeroError)
+    print('This should print\n')
+    42
+  end
+end
+
+variable = throws()
+
+print('This should also print\n')
+print('This should be 42: ', variable, '\n')