title: haxe macro catching of Context.parse() errors
body: <p>At compile (macro) time, calling </p>
  
  <pre><code>Context.parse("a bad expression", somePos) 
  </code></pre>
  
  <p>produces an error that <em>cannot</em> be caught in a try-catch block (<strong>Edit:</strong> this is wrong, see below). Is there a way to catch this error? Context.parseInlineString() doesn't seem to work either.</p>
  
  <p>Others functions such as Context.typeExpr() have a similar problem.</p>
  
  <p><strong>Edit:</strong>
  The <em>type</em> of catch was wrong. I did:</p>
  
  <pre><code>try {...}
  catch (err:String) {...}
  </code></pre>
  
  <p>What you have to do:</p>
  
  <pre><code>try {...}
  catch (err:Dynamic) {...}
  </code></pre>
  
  <p>Careful reading of the documentation explains this. This is different than Java for which there is one type of exception per error. In Haxe, <em>most</em> errors are strings, but there are some others like the one here.</p>