Handle %stacks not being a pair
Not sure when this would happen, but guard against it.
This commit is contained in:
parent
8c63ed7b4e
commit
7ba77010ae
4 changed files with 53 additions and 38 deletions
13
knots.scm
13
knots.scm
|
@ -67,11 +67,14 @@
|
|||
(define* (print-backtrace-and-exception/knots
|
||||
exn
|
||||
#:key (port (current-error-port)))
|
||||
(let* ((stack (match (fluid-ref %stacks)
|
||||
((stack-tag . prompt-tag)
|
||||
(make-stack #t
|
||||
0 prompt-tag
|
||||
0 (and prompt-tag 1)))))
|
||||
(let* ((stack
|
||||
(match (fluid-ref %stacks)
|
||||
((stack-tag . prompt-tag)
|
||||
(make-stack #t
|
||||
0 prompt-tag
|
||||
0 (and prompt-tag 1)))
|
||||
(_
|
||||
(make-stack #t))))
|
||||
(error-string
|
||||
(call-with-output-string
|
||||
(lambda (port)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue