exit2.scm 408 B

12345678910111213141516171819
  1. ;; Test that emergency exit doesn't call finally-handler.
  2. (define (fun x)
  3. (try-finally
  4. (begin
  5. (format #t "before exit~%~!")
  6. (emergency-exit 0)
  7. (format #t "after exit~%~!"))
  8. (begin
  9. (format #t "in-finally~%~!")))
  10. (format #t "finish fun~%~!")
  11. (* x x))
  12. (format #t "before call fun~%~!")
  13. (fun 5)
  14. (format #t "after call fun~%~!")
  15. ;; Output: before call fun
  16. ;; Output: before exit