1

Topic: How program to catch ERR_CONNECTION_RESET

Wrote the program which uses AJAX.
At debugging I use the Chrome debugger.
The program works, but at some instant glorks.
The debugger shows:
POST some URL net:: ERR_CONNECTION_RESET
I follow the link. She specifies on myAjaxObject.send (Req); - the program text see.
That is the command try does not catch this business.
And how still differently to catch this failure program?
Thanks.
PS. On the Internet tell about how to change network adjustments of the computer.
All it is very interesting. But it is more important to me to learn, how this failure to catch program.
PPS. The program is debugged locally, in boundaries of one computer.
That is the Web server is a Visual Studio 2010.

var myAjaxObject;
//In this place there is a formation myAjaxObject - classics of a genre....
myAjaxObject.open ("POST", dataSource, true);
myAjaxObject.setRequestHeader (' Content-Type ', ' application/x-www-form-urlencoded ');
myAjaxObject.onreadystatechange = myCallBackFunction;
try {
myAjaxObject.send (Req);//<== THE CHROME DEBUGGER SPECIFIES HERE, AS TO THE PLACE OF FAILURE
return;
}
catch (err) {
alert (err.message);
}
function myCallBackFunction () {
var Resp;
if (myAjaxObject.readyState === 4 && myAjaxObject.status === 200) {
Resp = myAjaxObject.responseText;
delete myAjaxObject;
//Handling Resp...
}
}

2

Re: How program to catch ERR_CONNECTION_RESET

Error of a call of an asynchronous method so simply not to catch.
Especially, if you " do not google,  it is necessary to write the code".
Excessive operation to letters to type in a line of search catch err_connection_reset javascript.

3

Re: How program to catch ERR_CONNECTION_RESET

Ruslan Damirovich;
For thanks answer.
And it is not necessary to be rude.

4

Re: How program to catch ERR_CONNECTION_RESET

Well, :

myAjaxObject.onerror = function () {it is operatively reacted;}