Skip to content

Commit

Permalink
onTabReplaced: upgrade errors from warnings to exceptions
Browse files Browse the repository at this point in the history
For consistency with the other onTab*() handlers.
  • Loading branch information
cxw42 committed Dec 25, 2022
1 parent 1277ea2 commit 98e8924
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/win/main_tl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 98e8924

Please sign in to comment.