From ffd0b8ab28d25d1496fb0722115991a8a623ec1f Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 8 Jan 2022 16:28:29 -0500 Subject: Remove comment about not having error formatting --- doc/assert.md | 2 +- docs/doc/assert.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/assert.md b/doc/assert.md index 7f4bee6d..121d8a1e 100644 --- a/doc/assert.md +++ b/doc/assert.md @@ -15,7 +15,7 @@ To pass, the right argument must be exactly the number `1`; any other value caus Assert can take a left argument, which gives a message to be associated with the error. It's typical to use a string for the left argument in order to display it to the programmer, but the left argument can be any value. "Message" ! 0 - ⟨∘,"abc",˜⟩ ! '0' # Okay this is not a very helpful printout + ⟨∘,"abc",˜⟩ ! '0' ### Computing the error message on demand diff --git a/docs/doc/assert.html b/docs/doc/assert.html index 1d56a9ed..948f8cf7 100644 --- a/docs/doc/assert.html +++ b/docs/doc/assert.html @@ -18,10 +18,10 @@ 1

Assert can take a left argument, which gives a message to be associated with the error. It's typical to use a string for the left argument in order to display it to the programmer, but the left argument can be any value.

-↗️
    "Message" ! 0
+↗️
    "Message" ! 0
 Error: Message
-    ,"abc",˜ ! '0'  # Okay this is not a very helpful printout
-Error: ⟨∘,"abc",˜⟩
+    ,"abc",˜ ! '0'
+Error: ⟨∘,"abc",˜⟩
 

Computing the error message on demand

Because the left argument to a function is always computed before the function is called, Assert doesn't let you compute the error message only if there's an error. This might be a problem if the error message computation is slow or has side effects. There are a few ways to work around the issue:

-- cgit v1.2.3