commit 9476b2e92ce88368b64e79a7d17e0849ac07a460
parent 5650dbc886f5f42190808b25e2c26b9bed2ddbcc
Author: Yuval Langer <yuval.langer@gmail.com>
Date: Mon, 22 Jan 2024 21:01:43 +0200
Add error type raising TODO.
Diffstat:
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/TODO.org b/TODO.org
@@ -25,3 +25,14 @@ Zipheir's points:
read-something.
- [X] Actually, X->Y procedures in Scheme generally return one
value. I don't think there are any exceptions.
+- [ ] [me: i should make a note about the error api, which i don't
+ quite understand.] That will take some thought. The library should
+ raise a specific type of condition to indicate RSV errors. This is
+ similar to the bytestring library, which exports
+ bytestring-error?. https://srfi.schemers.org/srfi-207/srfi-207.html
+ [me: so define-record-type <rsv-error>?] That's the most portable
+ way to do it. If you're willing to depend on R6RS conditions (which
+ Guile has, and which R7RS-large will eventually have) you could use
+ define-condition-type. Then you'd use something like (raise
+ (make-rsv-error-object MESSAGE IRRITANT ...)), instead of 'error',
+ to actually signal a problem.