Catch errors inside loadEntry method in Datastore class

This commit is contained in:
Christer Warén 2021-09-18 02:17:00 +03:00
parent a7f3029be0
commit 53fda7c401

View File

@ -48,8 +48,11 @@ module.exports = class {
}
loadEntry(id){
const json = require(`../../../datastore/` + id + '.json');
this.map.set(id, json);
try {
const json = require(`../../../datastore/` + id + '.json');
this.map.set(id, json);
} catch (error) {
}
}
getEntry(id){