Simplify and extend using the knots exception with stack

This commit is contained in:
Christopher Baines 2025-02-27 12:08:41 +00:00
parent d8bc09755e
commit ed4113af51
3 changed files with 38 additions and 29 deletions

View file

@ -52,7 +52,11 @@
(let ((stack (make-stack #t
0 prompt-tag
0 (and prompt-tag 1))))
(put-message reply (list 'exception exn stack)))))
(put-message reply
(list 'exception
(make-exception
exn
(make-knots-exception stack)))))))
(return))
(lambda ()
(call-with-values
@ -69,12 +73,7 @@
(map
(match-lambda
(('exception exn stack)
(let ((knots-exn
(make-knots-exception stack)))
(raise-exception
(make-exception
knots-exn
exn))))
(raise-exception exn))
(result
(apply values result)))
responses)))
@ -118,13 +117,8 @@
(vector-ref result-vec index))
(lambda (result)
(match result
(('exception exn stack)
(let ((knots-exn
(make-knots-exception stack)))
(raise-exception
(make-exception
knots-exn
exn))))
(('exception exn)
(raise-exception exn))
(_
(vector-set! result-vec
index
@ -275,10 +269,5 @@
(put-message input-channel (cons reply-channel args))
(match (get-message reply-channel)
(('result . vals) (apply values vals))
(('exception exn stack)
(let ((knots-exn
(make-knots-exception stack)))
(raise-exception
(make-exception
knots-exn
exn))))))))
(('exception exn)
(raise-exception exn))))))