From 07bf9008a0698d2ada09fe7db471adb349f1703c Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 16 Apr 2021 15:44:04 -0400 Subject: =?UTF-8?q?Specification=20for=20Catch=20(=E2=8E=8A)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/primitive.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'spec/primitive.md') diff --git a/spec/primitive.md b/spec/primitive.md index 386b0dcf..dc089cfa 100644 --- a/spec/primitive.md +++ b/spec/primitive.md @@ -75,6 +75,8 @@ Inferred properties are specified in [their own document](inferred.md), not in t - **Assert** (`!`) causes an error if the argument is not `1`. If `𝕨` is provided, it gives a message to be associated with this error (which can be any value, not necessarily a string). +- **Catch** (`⎊`) evaluates `𝔽` on the arguments `𝕨` (if present) and `𝕩`. If `𝔽` completes without error it returns the result, but if evaluation of `𝔽` results in an error then the error is suppressed, and Catch evaluates `𝔾` on the arguments and returns the result. Errors in `𝔾` are not caught. Catch only prevents evaluation errors, and not syntax errors: these are considered errors in the program as a whole rather than any particular part of it. + ## Commentary on other primitives As noted above, see [reference.bqn](reference.bqn) for the authoritative definitions. Commentary here gives an overall description and highlights implementation subtleties and edge cases. -- cgit v1.2.3