title: Why does my implementation of get set give a stack error that I cannot catch?
body: <p>I have the following:</p>
  
  <pre><code>    private int order;
      public int Order {
          get { return order; }
          set {
              if ((value &lt; 0) || (value &gt; 99)) {
                  throw new Exception(string.Format("{0} must be between 0 and 99", value.ToString()));
              } else {
                  order = value;
              }
          }
      }
  </code></pre>
  
  <p>This is called here:</p>
  
  <pre><code>            try {
                  property.SetValue(reference, convertedValue, null);
              } catch (Exception e) {
                  var a = e;
              }
  </code></pre>
  
  <p>When I set a value of 50 everything works okay. When I set the value to 123 and step through with the debug it goes to the property.SetValue line and then next thing is it gives me this and points to the end of the "} else {" code block in the first code snippet.</p>
  
  <pre><code>System.Exception was unhandled by user code
    HResult=-2146233088
    Message=123 must be between 0 and 99
    Source=Test.Storage
    StackTrace:
         at Storage.Models.Reference.set_Order(Int32 value) in C:\Code K\139- Aug  23\Common\Storage\Models\Reference.cs:line 22
    InnerException: 
  </code></pre>
  
  <p>Can someone explain why the exception is not handled? I can't understand why it would not be caught with the try loop that surrounds property.SetValue. I have a debug point on var a = e; but it doesn't go there.</p>