aboutsummaryrefslogtreecommitdiff
path: root/doc/err.md
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2015-03-01 02:23:02 +0100
committerDrahflow <drahflow@gmx.de>2015-03-01 02:23:02 +0100
commitfd0f4713b983ca85a3868b48ef7503f09d46f96d (patch)
tree155ea823bf71a97d923d698cfcf08958dcec9374 /doc/err.md
parentbb418473dffc81e7e8a5c365a45b3286257eff2e (diff)
Improved error handling doc
Diffstat (limited to 'doc/err.md')
-rw-r--r--doc/err.md14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/err.md b/doc/err.md
index 48ac1c4..0615e66 100644
--- a/doc/err.md
+++ b/doc/err.md
@@ -33,17 +33,23 @@ Takes a string and raises an error of the specified kind.
Takes a string and a scope and raises an error of the kind specified by the string. The scope members
are possible ways to react to the error provided to upper layers of the application.
- < { "ignored" dump } =*ignore { "oops" die } =*terminate > ???fatal.testError
+ <
+ { "ignored" dump } =*ignore
+ { "oops" die } =*terminate
+ > ???fatal.testError
`?!`
----
-Specifies behavior if an error occurs. Takes to function objects. The first is executed. If an error occurs
+Specifies behavior if an error occurs. Takes two function objects. The first is executed. If an error occurs
during its execution, the second is invoked with the error handling scope provided on the stack.
{
- < { "ignored" dump } =*ignore { "oops" die } =*terminate > ???fatal.testError
+ <
+ { "ignored" dump } =*ignore
+ { "oops" die } =*terminate
+ > ???fatal.testError
} /maybeFailFunction deff
|maybeFailFunction { .terminate } !?fatal # handle all fatal.* errors by the .terminate action
@@ -97,4 +103,4 @@ instruction pointer to an earlier state.
currentConfig configFiles len lt {
checkpoint 0 ! # rewind execution back to checkpoint
} rep # ... if candidates remain
- } ?!io # apply above rules to any io.* errors
+ } ?!io # do this on any io.* errors