aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-09-02 18:55:54 +0200
committerMaxime Devos <maximedevos@telenet.be>2021-09-21 12:20:56 +0200
commit289c4adba9ab875223a269aaee1b9b28b3981537 (patch)
tree5a95830b22ca8e5792ab0bd55e31434437d9184c /gnu
parent299ccf8c7cf22816da4d1acf4fb711fe375c076f (diff)
downloadgnunet-scheme-289c4adba9ab875223a269aaee1b9b28b3981537.tar.gz
gnunet-scheme-289c4adba9ab875223a269aaee1b9b28b3981537.zip
mq: Inject errors when message verification has negative result.
* README.org (List of errors): Document logic:ill-formed. * doc/scheme-gnunet.tm (logic:ill-formed): New explanation. * gnu/gnunet/mq.scm (inject-message!): Document logic:ill-formed error. Inject that error when the verificator returns falsehood. * tests/mq.scm ("ill-formed message error"): New test.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/gnunet/mq.scm7
1 files changed, 3 insertions, 4 deletions
diff --git a/gnu/gnunet/mq.scm b/gnu/gnunet/mq.scm
index 540e463..24546ca 100644
--- a/gnu/gnunet/mq.scm
+++ b/gnu/gnunet/mq.scm
@@ -184,8 +184,8 @@ messages must be sent in-order (TODO really received in-order?)."
184 "Call the message handler that was registered 184 "Call the message handler that was registered
185for the type of the message @var{mq} in the message queue var{mq} 185for the type of the message @var{mq} in the message queue var{mq}
186with the message @var{message}. In case the message is malformed 186with the message @var{message}. In case the message is malformed
187(according to the message handler), inject a @code{&malformed-message} 187(according to the message handler), inject a @code{logic:ill-formed}
188error instead (TODO). In case no appropriate message handler exists, 188error instead. In case no appropriate message handler exists,
189inject a @code{logic:no-handler} error instead. 189inject a @code{logic:no-handler} error instead.
190 190
191It is an error for @var{message} to be so small it doesn't have 191It is an error for @var{message} to be so small it doesn't have
@@ -220,8 +220,7 @@ of message queues."
220 (? (not handler) 220 (? (not handler)
221 (inject-error! mq 'logic:no-handler type)) 221 (inject-error! mq 'logic:no-handler type))
222 (? (not (verify-message? handler message)) 222 (? (not (verify-message? handler message))
223 ;; TODO: error handling 223 (inject-error! mq 'logic:ill-formed type)))
224 (inject-error! handler ???))) ; malformed message
225 ;; TODO: maybe a good place to catch out-of-memory 224 ;; TODO: maybe a good place to catch out-of-memory
226 ;; and stack overflow errors ... 225 ;; and stack overflow errors ...
227 (handle-message! handler message))) 226 (handle-message! handler message)))