--- /dev/null
+variable = 42 // 0
+
+print('This should not print')
--- /dev/null
+def throws() do
+ 42 // 0
+end
+
+variable = throws()
+
+print('This should not print')
--- /dev/null
+def throws() do
+ try
+ 42 // 0
+ finally
+ print('This should print')
+ end
+end
+
+variable = throws()
+
+print('This should not print')
--- /dev/null
+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')
--- /dev/null
+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')