Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1625)

Unified Diff: tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py

Issue 955263003: Telemetry: Simplify exception handling of failed websocket connections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@telemetry_make_new_exceptions5
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py b/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py
index ec93210a0bbc8e1dbba33ec921fc3b05def65609..796b73e4638a43c4184a8e0cb0fe514f6dfb2358 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/tab_list_backend.py
@@ -74,10 +74,12 @@ class TabListBackend(inspector_backend_list.InspectorBackendList):
def CreateWrapper(self, inspector_backend):
return tab.Tab(inspector_backend, self, self._browser_backend.browser)
- def _HandleDevToolsConnectionError(self, err_msg):
+ def _HandleDevToolsConnectionError(self, error):
if not self._browser_backend.IsAppRunning():
- raise exceptions.BrowserGoneException(self.app, err_msg)
+ error.AddDebuggingMessage('The browser is not running. It probably '
+ 'crashed.')
elif not self._browser_backend.HasBrowserFinishedLaunching():
- raise exceptions.BrowserConnectionGoneException(self.app, err_msg)
+ error.AddDebuggingMessage('The browser exists but cannot be reached.')
else:
- raise exceptions.DevtoolsTargetCrashException(self.app, err_msg)
+ error.AddDebuggingMessage('The browser exists and can be reached. '
+ 'The devtools target probably crashed.')
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698