From c23e8c1a5ce8dbb65555878122fef9f44877b43f Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Fri, 6 Mar 2015 15:09:31 -0500 Subject: [PATCH] Add mroe clarifying error message to supplement a fix for #4 --- background.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/background.js b/background.js index 4fe3e63..3663daf 100644 --- a/background.js +++ b/background.js @@ -67,7 +67,7 @@ function findWindowById(windowId){ return {'window':w[0],'index':windows.indexOf(w[0])}; } else if (w.length===0){ - throw "Could not find window with id "+windowId; + throw "Could not find window with id "+windowId+" in window list. May be non-normal window such as a popup."; } else{ throw "Found more than one window with id "+windowId; @@ -87,7 +87,7 @@ function findTabById(queryWindow,tabId){ return {'tab':t[0],'index':queryWindow.tabs.indexOf(t[0]),'window':queryWindow,'windowIndex':windowIndex}; } else if (t.length===0){ - throw "Could not find tab with id "+tabId+" in window with id "+queryWindow.id; + throw "Could not find tab with id "+tabId+" in window with id "+queryWindow.id+" in window list. May be non-normal window such as a popup.";; } else{ throw "Found more than one tab with id "+tabId+" in window with id "+queryWindow.id;