title: try catch does not work for "return Json()" exceptions
body: <p>When the length of characters in json result is large the following exception will be raised:</p>
  
  <blockquote>
    <p>Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.</p>
  </blockquote>
  
  <p>The above exception is a server side exception with 500 response code so if we put the source code inside a try catch block, the error should be caught in catch block, but try catch does not work for this scenario.</p>
  
  <p>You could test this problem by following code, please use it inside an asp.net mvc controller:</p>
  
  <pre><code>public JsonResult Test()
      {
          try
          {
              var result = "";
              var v1 = new JavaScriptSerializer();
  
              for (int i = 0; i &lt; (v1.MaxJsonLength / 100) + 10; i++)
              {
                  result += "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789";
              }
  
              //exception message:
              //Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
              return Json(result, JsonRequestBehavior.AllowGet);
          }
          catch
          {
              //when exception is raised the catch will not be called
  
              return null;
          }
  
  
      }
  </code></pre>