16 lines
466 B
Scheme
16 lines
466 B
Scheme
|
|
(use-modules (knots)
|
||
|
|
(knots backtraces)
|
||
|
|
(system repl debug))
|
||
|
|
|
||
|
|
(with-exception-handler
|
||
|
|
(lambda (exn)
|
||
|
|
(let ((stack (make-stack #t)))
|
||
|
|
(print-backtrace-and-exception/knots exn)
|
||
|
|
(simple-format/knots #t
|
||
|
|
"situation: ~A\n"
|
||
|
|
(classify-stack-situation
|
||
|
|
(stack->vector stack))))
|
||
|
|
(primitive-exit 0))
|
||
|
|
(lambda ()
|
||
|
|
(error "test")))
|