title: try-catch doesn't work with XMLHTTPRequest
body: <p>I am trying to use the <code>try-catch</code> statements to handle the errors from <code>XMLHTTPRequest</code>, like below:</p>
  
  <pre><code>var xhr = new XMLHttpRequest();
  xhr.open('POST', someurl, true);
  try{
      xhr.sendMultipart(object);
  }
  catch(err){
      error_handle_function();
  }
  </code></pre>
  
  <p>When there was a 401 error thrown by <code>xhr.sendMultipart</code>, the <code>error_handle_function</code> was not called. Any idea how to fix this?</p>
  
  <p>Thanks!</p>