title: jQuery Ajax Error object is undefined
body: <p>I hvae a webmethod called using jquery ajax. I hits the error callback. Fine - I thought I will analyze the error - but it is coming as undefined.</p>
  
  <p>What are the possibilities for the  error values to be undefined? How to fix this, if it is a trivial error?</p>
  
  <p>Note: <code>xhr</code>,<code>status</code> and <code>error</code> are undefined.</p>
  
  <p>Note:  I am using Chrome version 35 and IE 8</p>
  
  <p><strong>CODE</strong></p>
  
  <pre><code>$(document).ready(function () {
      function errorFunction(xhr, status, error) {
          console.log(xhr);
          if (xhr == 'undefined' || xhr == undefined) {
              alert('undefined');
          } else {
              alert('object is there');
          }
          alert(status);
          alert(error);
      }
  
      $.ajax({
          type: "POST",
          url: "admPlantParametersViewEdit.aspx/GetResult",
          data: "{}",
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function (msg) {
              alert("success");
              alert(msg.d);
          },
          error: errorFunction()
      });
  });
  </code></pre>