Catch problems read server config

This commit is contained in:
Björn Dahlgren 2014-06-04 23:24:48 +02:00
parent 45e3c7f088
commit b6513b6d50

View File

@ -131,9 +131,13 @@ Manager.prototype.load = (function () {
return;
}
JSON.parse(data).forEach(function (server) {
self._addServer(server.id, server.title, server.port, server.mods);
});
try {
JSON.parse(data).forEach(function (server) {
self._addServer(server.id, server.title, server.port, server.mods);
});
} catch(e) {
console.error("Manager load error: " + e);
}
});
});