(define (error-handling-test) (let ((dir "dir")) (create-directory "dir") (with-errno-handler ((e1 d1) ((errno/exist) (format #t "errno-msg = ~A~%syscall = ~A~%data = ~A~%~% Directory exists~%" (nth d1 0) (nth d1 1) (nth d1 2))) (else (error "Do no know that to do now, giving up\n"))) (create-directory dir)) (with-errno-handler ((e2 d2) ((errno/isdir) (display "Ups, was a directory so running delete-directory instead\n") (delete-directory dir))) (delete-file dir))))