title: C# error handling (NaN)
body: <p>I have written simple math function plotter in C# using Patrick Lundin´s Math free parser.</p>
  
  <p>Now, my code snippet is this: </p>
  
  <pre><code>for (float value = -xaxis; value &lt; xaxis; value += konst)
          {
              hash.Add("x", value.ToString());
              double result = 0;
              result = parser.Parse(func, hash);...
  </code></pre>
  
  <p>This works perfectly for functions defined on real numbers. But, when I want want to parse functions defined only on R+ for example, ln(x), naturally parser gives NaN into result.</p>
  
  <p>Now, I tried to handle it thru exception handling, like so:</p>
  
  <pre><code>for (float value = -xaxis; value &lt; xaxis; value += konst)
          {
              hash.Add("x", value.ToString());
              double result = 0;
              try{
              result = parser.Parse(func, hash);
              }
              catch {
              count = false;  //just a variable I am using to draw lines
              continue; // I hoped to skip the "wrong" number parsed until I came to R+ numbers
              }...
  </code></pre>
  
  <p>But this doesen´t work, while debugging, catch is not executed at all.</p>
  
  <p>Please, what am I doing wrong? Thanks.</p>