Creating a generic UI error handling mechanism

This commit is contained in:
Bruno Alves de Faria committed 2018-02-27 07:12:23 -03:00
1 parent 3c1e4c51cd
commit 798b197d4a
13 files changed
+81 -9

No files matched your search

@@ -81,7 +81,7 @@ export class HotkeysManager {
load(contextName) {
return new Promise((resolve, reject) => {
const context = this.getContext(contextName);
if (!context) return;
if (!context) return reject();
this.retrieve(contextName).then(defs => {
const definitions = defs || this.defaults[contextName];
if (!definitions) {
@@ -151,6 +151,6 @@ export class HotkeysManager {
this.currentContextName = contextName;
newContext.initialize();
this.load(contextName);
this.load(contextName).catch(() => {});
}
}