Улучшение обработки ошибок

This commit is contained in:
Book Pauk
2022-10-21 13:50:55 +07:00
parent 294fb35f4d
commit e865070f23

View File

@@ -83,6 +83,7 @@ class ConfigManager {
}
async load() {
try {
if (!this.inited)
throw new Error('not inited');
@@ -101,6 +102,9 @@ class ConfigManager {
} else {
await this.save();
}
} catch(e) {
throw new Error(`Error while loading "${this.userConfigFile}": ${e.message}`);
}
}
async save() {