[jquery] jQuery Ajax error handling, show custom exception messages

I found this to be nice because I could parse out the message I was sending from the server and display a friendly message to the user without the stacktrace...

error: function (response) {
      var r = jQuery.parseJSON(response.responseText);
      alert("Message: " + r.Message);
      alert("StackTrace: " + r.StackTrace);
      alert("ExceptionType: " + r.ExceptionType);
}