mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-23 11:53:16 +00:00
Catch errors inside loadEntry method in Datastore class
This commit is contained in:
parent
a7f3029be0
commit
53fda7c401
@ -48,8 +48,11 @@ module.exports = class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadEntry(id){
|
loadEntry(id){
|
||||||
|
try {
|
||||||
const json = require(`../../../datastore/` + id + '.json');
|
const json = require(`../../../datastore/` + id + '.json');
|
||||||
this.map.set(id, json);
|
this.map.set(id, json);
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getEntry(id){
|
getEntry(id){
|
||||||
|
Loading…
Reference in New Issue
Block a user