[gambit-list] automatic ,b on error triggering recursive repl

Marc Feeley feeley at iro.umontreal.ca
Thu Oct 15 16:36:24 EDT 2009

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.


(define (auto-backtrace-exception-handler-hook exc other-handler)
    (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

More information about the Gambit-list mailing list