1
0
Fork 0

Catch http error if server is not responding

This commit is contained in:
Gregory Eremin 2016-01-10 17:29:47 +03:00
parent a8cab895db
commit f0450ea703
1 changed files with 6 additions and 1 deletions

View File

@ -39,5 +39,10 @@ function getURL(url, params, callback) {
}
}
};
xhr.send(null);
try {
xhr.send(null);
} catch (e) {
callback({error: e});
}
}