[racket] with-handlers string->xexpr fail

From: David Van Horn (dvanhorn at ccs.neu.edu)
Date: Fri Oct 22 17:42:24 EDT 2010

On 10/22/10 5:38 PM, scouic wrote:
> I thought invalid-xexpr?was necessarily a boolean returning # t or # f ...
> thank you very much for your explanation David

exn:invalid-xexpr? is a predicate: it's a function that can be applied 
to any value and it will return either #t or #f.  It returns #t only for 
exn:invalid-xexpr values.  When applied to exn:xml values, it returns 
#f.  That's why you want to use exn:xml? in this particular case.

David



Posted on the users mailing list.