title: get the current function name in javascript
body: <p>I have this piece of code:</p>
  
  <pre><code>function MyFunction()
  {
      $.ajax({
          type: "POST",
          url: "ajax.php",
          dataType: "json",
          data: "foo=bar",
          error:function(XMLHttpRequest, textStatus, errorThrown)
          {
              alert(arguments.callee);
          },
          success: function(jsonObject)
          {
              //do something
          }
      });
  }
  </code></pre>
  
  <p>what I want is that the alert inside de error scoope shows the function name, in this case "MyFunction" but instead what I get is the error:function. </p>
  
  <p>How can I achieve this?</p>