(import (chicken file) (chicken errno) (chicken condition) (chicken process-context) ) (handle-exceptions exn (let ((errno (get-condition-property exn 'exn 'errno #f))) (case errno ((errno/noent) (print "Ok, fine: " errno)) (else (print "Not fine: <" errno "> vs. <" errno/noent ">")))) (delete-directory (car (command-line-arguments)))) $ chicken-csi -s delete-directory.scm /foo/bar Not fine: <2> vs. <2>