Adding error handling

This commit is contained in:
tunefish 2018-02-19 01:03:10 +01:00
parent e25e0961d6
commit 2a6775ab12

View file

@ -193,6 +193,8 @@ const assignManager = {
url: tab.url, url: tab.url,
}).then(() => { }).then(() => {
browser.tabs.remove(tab.id); browser.tabs.remove(tab.id);
}).catch((e) => {
throw e;
}); });
return; return;
} }
@ -325,7 +327,7 @@ const assignManager = {
identities.forEach((identity) => { identities.forEach((identity) => {
browser.contextMenus.remove(this.cookieStoreId2menuId(identity.cookieStoreId)); browser.contextMenus.remove(this.cookieStoreId2menuId(identity.cookieStoreId));
}); });
}); }).catch(() => {});
browser.contextMenus.remove(this.MENU_REOPEN_IN); browser.contextMenus.remove(this.MENU_REOPEN_IN);
browser.contextMenus.remove(this.MENU_REMOVE_ID); browser.contextMenus.remove(this.MENU_REMOVE_ID);
browser.contextMenus.remove(this.MENU_SEPARATOR_ID); browser.contextMenus.remove(this.MENU_SEPARATOR_ID);