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

Unified Diff: tools/android/loading/controller.py

Issue 2026193003: tools/android/loading: Lets some execption pass through chrome controller's Open (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/controller.py
diff --git a/tools/android/loading/controller.py b/tools/android/loading/controller.py
index 279d0ba81a71783fecea00539c2401b911db9144..aede30224cd255f3e5d099323cbd4e95bc2aae97 100644
--- a/tools/android/loading/controller.py
+++ b/tools/android/loading/controller.py
@@ -82,6 +82,7 @@ class ChromeControllerError(Exception):
"""
_INTERMITTENT_WHITE_LIST = {websocket.WebSocketTimeoutException,
devtools_monitor.DevToolsConnectionTargetCrashed}
+ _PASSTHROUGH_WHITE_LIST = (MemoryError, SyntaxError)
pasko 2016/06/01 12:47:17 wow, interesting, did you actually hit a memory er
gabadie 2016/06/01 12:54:43 It is not obvious in this CL but there is exceptio
pasko 2016/06/01 13:42:22 thanks, it is indeed not obvious
def __init__(self, log):
"""Constructor
@@ -354,7 +355,9 @@ class RemoteChromeController(ChromeControllerBase):
raise ChromeControllerInternalError(
'Failed to connect to Chrome devtools after {} '
'attempts.'.format(self.DEVTOOLS_CONNECTION_ATTEMPTS))
- except:
+ except ChromeControllerError._PASSTHROUGH_WHITE_LIST:
+ raise
+ except Exception:
logcat = ''.join([l + '\n' for l in self._device.adb.Logcat(dump=True)])
raise ChromeControllerError(log=logcat)
finally:
@@ -520,7 +523,9 @@ class LocalChromeController(ChromeControllerBase):
connection.Close()
chrome_process.wait()
chrome_process = None
- except:
+ except ChromeControllerError._PASSTHROUGH_WHITE_LIST:
+ raise
+ except Exception:
raise ChromeControllerError(log=open(tmp_log.name).read())
finally:
if OPTIONS.local_noisy:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698