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: |