Hi,<br>i learn with-handlers mechanism, and i don&#39;t understand what&#39;s wrong in this piece of code ?<br><br>#lang racket<br>(require xml)<br><br>(define a-good-string &quot;&lt;doc&gt;&lt;bold&gt;hi&lt;/bold&gt; there!&lt;/doc&gt;&quot;)<br>
(define a-bad-string &quot;&lt;doc&gt;&lt;boooooold&gt;hi&lt;/bold&gt; there!&lt;/doc&gt;&quot;)<br><br>(define (panoramix s)<br>  (with-handlers ((exn:invalid-xexpr? (lambda (e) &#39;UFO)))<br>    (string-&gt;xexpr s)))<br>
<br>(panoramix a-good-string)<br>; this is ok and returns &gt; &#39;(doc () (bold () &quot;hi&quot;) &quot; there!&quot;)<br><br>(panoramix a-bad-string)<br>; &lt;unsaved editor&gt;::6: read-xml: parse-error: start tag `boooooold&#39; at [1.5/6 1.16/17] doesn&#39;t match end tag `bold&#39; at [1.18/19 1.25/26]<br>
<br>Why it returns an error and not UFO ?<br><br>thanks,<br>-mw<br>