guile-knots/tests/backtraces/stack-situation-fibers.scm
2026-03-23 11:43:25 +00:00

20 lines
632 B
Scheme

(use-modules (knots)
(knots backtraces)
(fibers)
(system repl debug))
(run-fibers
(lambda ()
(with-exception-handler
(lambda (exn)
(let ((stack (make-stack #t)))
(print-backtrace-and-exception/knots exn)
(simple-format/knots #t
"situation: ~A\n"
((@@ (knots backtraces)
classify-stack-situation)
(stack->vector stack))))
(primitive-exit 0))
(lambda ()
(error "test"))))
#:hz 0 #:parallelism 1)