Улучшение обработки ошибок
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user