On 2009-10-15, at 3:56 PM, lowlycoder wrote:
Hi!
Running gambit with -:dar , I get recursive repls whenever any thread throws an exception (and these are sent to different xterms). Now, is there anyway, when an error is hit, to have an backtrace happen autoamticaly (generally, I go to the xterm and hit ,b) -- this would just help my work flow much better as it eliminates the need to leave my editor.
This should do the trick.
Marc
(define (auto-backtrace-exception-handler-hook exc other-handler) (continuation-capture (lambda (cont) ;; (display-exception-in-context exc cont (repl-output-port)) (display-continuation-backtrace cont (repl-output-port) #f #t) (##repl-exception-handler-hook exc other-handler))))
(set! ##primordial-exception-handler-hook auto-backtrace-exception-handler-hook)