summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhenesy <henesy.dev@gmail.com>2019-03-11 22:32:42 -0500
committerhenesy <henesy.dev@gmail.com>2019-03-11 22:32:42 -0500
commitce87687bbc9586ae0ecb1ea646596a76410ef568 (patch)
tree6525289b3db8e2c8015f1eef2356ef1e3403f3d1
parent747ef3dcbcb100c40659805d13d966540a892319 (diff)
add beginnings of exceptions example
-rw-r--r--Exceptions/README.md19
-rw-r--r--Exceptions/exceptions.b21
2 files changed, 40 insertions, 0 deletions
diff --git a/Exceptions/README.md b/Exceptions/README.md
new file mode 100644
index 0000000..df654d3
--- /dev/null
+++ b/Exceptions/README.md
@@ -0,0 +1,19 @@
+# Exceptions
+
+Limbo supports the throwing, catching, and custom definition of exceptions.
+
+The example in this section is a derivative of the function reference summary in the [Limbo Addendum](http://www.vitanuova.com/inferno/papers/addendum.pdf).
+
+## Source
+
+###
+
+
+
+## Demo
+
+
+
+## Exercises
+
+-
diff --git a/Exceptions/exceptions.b b/Exceptions/exceptions.b
new file mode 100644
index 0000000..336c448
--- /dev/null
+++ b/Exceptions/exceptions.b
@@ -0,0 +1,21 @@
+implement Exceptions;
+
+include "sys.m";
+include "draw.m";
+
+sys: Sys;
+print: import sys;
+
+Exceptions: module {
+ init: fn(nil: ref Draw->Context, nil: list of string);
+};
+
+init(nil: ref Draw->Context, nil: list of string) {
+ sys = load Sys Sys->PATH;
+
+
+
+ raise "going down!";
+
+ exit;
+}