Welcome to the CHICKEN Scheme pasting service
how to create an error type? added by kiatoa on Fri Nov 28 06:19:15 2014
megatest> (define (check thunk) --------> (condition-case (thunk) --------> ((exn file)(print "file error")) --------> ((exn timeout)(print "Caught timeout error")) --------> (var ()(print "something else")))) megatest> (check (lambda ()(open-input-file ""))) file error megatest> (check (lambda ()(signal (make-property-condition 'timeout 'message "Timed out talking to server")))) something else megatest> (define (check thunk) --------> (condition-case (thunk) --------> ((exn file)(print "file error")) --------> ((exn 'timeout)(print "Caught timeout error")) --------> (var ()(print "something else")))) megatest> (check (lambda ()(signal (make-property-condition 'timeout 'message "Timed out talking to server"))))