On Mar 25, 2019, at 12:05 PM, Matthias Felleisen wrote:

> Your exception handlers may test a contract failure to any level. You can 
> specify this in the predicate part of with-handlers or via match on the exn 
> within the handler function. Regexp matching works well here. 

It's obvious enough how to use regex matching for this purpose.  My concern is 
partly that it ends up being a lot of code to write and partly that I was 
assuming that the exact wording of error message details could change with 
updates.  Maybe these concerns are not so bad as I anticipate.  

>From The Racket Guide, I did not get the impression that you could test a 
>contract at any level.  Specifically, I don't see how you tell which parameter 
>caused the error. It could just be me not understanding something that is 
>actually obvious in the docs or maybe the docs need some work.  As usual, 
>examples would help.  I did search the web for examples of Racket code 
>including "exn:fail:contract" and found very little.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to