From 98e8924eafdca3678af7cd055ce8445b1cd929ad Mon Sep 17 00:00:00 2001 From: Chris White Date: Sun, 25 Dec 2022 14:24:47 -0500 Subject: [PATCH] onTabReplaced: upgrade errors from warnings to exceptions For consistency with the other onTab*() handlers. --- app/win/main_tl.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/win/main_tl.js b/app/win/main_tl.js index 6bc37bf..4ba1204 100644 --- a/app/win/main_tl.js +++ b/app/win/main_tl.js @@ -2745,8 +2745,7 @@ function onTabReplaced(addedTabId, removedTabId) const errmsg = M.react_onTabReplaced(addedTabId, removedTabId); if(typeof(errmsg) === 'string') { - log.warn(`Could not replace ${removedTabId} with ${addedTabId}: ${errmsg}`); - return; + throw new Error(`Could not replace ${removedTabId} with ${addedTabId}: ${errmsg}`); } } //onTabReplaced