Added a future folder to examples
[fur] / examples / future / 34_except_finally.fur
diff --git a/examples/future/34_except_finally.fur b/examples/future/34_except_finally.fur
new file mode 100644 (file)
index 0000000..d1aea97
--- /dev/null
@@ -0,0 +1,15 @@
+def throws() do
+  try
+    42 // 0
+  except(DivisionByZeroError)
+    print('This should print first\n')
+    42
+  finally
+    print('This should print second\n')
+    1
+  end
+end
+
+variable = throws()
+print('This should print third\n')
+print('This shoudld be 42: ', variable, '\n')