[gambit-list] Fatal crash
    Marc Feeley 
    feeley at iro.umontreal.ca
       
    Fri Apr 11 20:09:23 EDT 2008
    
    
  
On 11-Apr-08, at 8:03 PM, Marc Feeley wrote:
>
>
> The API for ##cmd-b changed.  You do not need to call these unsafe
> "##" procedures anymore because the functionality has been exposed
> with safe (type checking) procedures.  Here's what you should do:
Actually, this is probably what you meant to do (so that the  
continuation displayed is the one where the error occurred):
(define (compute-error-message e k)
   (call-with-output-string ""
     (lambda (p)
       (display-exception-in-context e k p)
       (newline p)
       (newline p)
       (display-continuation-backtrace k p))))
(define (crash)
   (with-exception-handler
     (lambda (e)
       (continuation-capture
        (lambda (k)
          (display (compute-error-message e k))
          (force-output))))
        (lambda ()
          (+ 1 a))))
(crash)
    
    
More information about the Gambit-list
mailing list