~ chicken-core (chicken-5) b3031e59cae47cd112acfe9e0b71cd61b9129cf1
commit b3031e59cae47cd112acfe9e0b71cd61b9129cf1
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Mon Jul 6 15:32:13 2020 +0200
Commit: Peter Bex <peter@more-magic.net>
CommitDate: Tue Jul 14 20:56:20 2020 +0200
Make sure ##sys#repl-recent-call-chain is always set.
Signed-off-by: Peter Bex <peter@more-magic.net>
diff --git a/repl.scm b/repl.scm
index 3fa2d3a2..b102b08f 100644
--- a/repl.scm
+++ b/repl.scm
@@ -128,15 +128,15 @@
(##sys#write-char-0 #\newline ##sys#standard-error)
(write-err args)))
(set! ##sys#repl-recent-call-chain
- (or (and-let* ((lexn ##sys#last-exception) ;XXX not really right
- ((##sys#structure? lexn 'condition))
- (a (member '(exn . call-chain) (##sys#slot lexn 2))))
- (let ((ct (cadr a)))
- (##sys#really-print-call-chain
- ##sys#standard-error ct
- "\n\tCall history:\n")
- ct))
- (print-call-chain ##sys#standard-error)))
+ (let ((ct (or (and-let* ((lexn ##sys#last-exception) ;XXX not really right
+ ((##sys#structure? lexn 'condition))
+ (a (member '(exn . call-chain) (##sys#slot lexn 2))))
+ (cadr a))
+ (get-call-chain 0 ##sys#current-thread))))
+ (##sys#really-print-call-chain
+ ##sys#standard-error ct
+ "\n\tCall history:\n")
+ ct))
(flush-output ##sys#standard-error))))
(lambda ()
(let loop ()
Trap