samedi 8 avril 2017

Is there a way to display info messages for any Dr. Racket Exception?

I currently have the following lines to try and test parts of code.

   (with-handlers ([exn:fail? (lambda (exn) 'Error)]) (car 17))

I was wondering it there was any way to change 'Error to a function of the caught exception in order to help print out the reason why it failed?

I've also been using check-not-exn, but that function writes too much information to the console.

Aucun commentaire:

Enregistrer un commentaire