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

Unified Diff: tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.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 | « tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py b/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py
index ea3a6e2f55fb31fc153c98ebc7e5f71652084279..c0c6a7c6a762e507054db5410d317b38a7920bd1 100644
--- a/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py
+++ b/tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend_list.py
@@ -77,9 +77,9 @@ class InspectorBackendList(collections.Sequence):
try:
backend = self._devtools_context_map_backend.GetInspectorBackend(
context_id)
- except inspector_backend.InspectorException:
- err_msg = sys.exc_info()[1]
- self._HandleDevToolsConnectionError(err_msg)
+ except exceptions.Error as e:
+ self._HandleDevToolsConnectionError(e)
+ raise e
# Propagate KeyError from GetInspectorBackend call.
wrapper = self.CreateWrapper(backend)
@@ -114,10 +114,10 @@ class InspectorBackendList(collections.Sequence):
if context_id not in self._filtered_context_ids:
del self._wrapper_dict[context_id]
- def _HandleDevToolsConnectionError(self, err_msg):
- """Call when handling errors in connecting to the DevTools websocket.
+ def _HandleDevToolsConnectionError(self, error):
+ """Called when handling errors in connecting to the DevTools websocket.
- This can be overwritten by sub-classes to further specify the exceptions
- which should be thrown.
+ This can be overwritten by sub-classes to add more debugging information to
+ errors.
"""
- raise exceptions.DevtoolsTargetCrashException(self.app, err_msg)
+ pass
« no previous file with comments | « tools/telemetry/telemetry/core/backends/chrome_inspector/inspector_backend.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698