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

Unified Diff: build/android/pylib/device/device_errors.py

Issue 338353004: [Android] Switch KillAll, StartActivity, and BroadcastIntent to DeviceUtils. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: appeasing windows Created 6 years, 6 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 | « build/android/pylib/device/decorators_test.py ('k') | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_errors.py
diff --git a/build/android/pylib/device/device_errors.py b/build/android/pylib/device/device_errors.py
index 1db7c1b1499b56f936c2f012de339a096429b0b0..7cfc87370536d5cd4d81feec3c6501cd845725cd 100644
--- a/build/android/pylib/device/device_errors.py
+++ b/build/android/pylib/device/device_errors.py
@@ -14,10 +14,18 @@ class BaseError(Exception):
class CommandFailedError(BaseError):
"""Exception for command failures."""
- def __init__(self, cmd, msg, device=None):
+ def __init__(self, msg, device=None):
super(CommandFailedError, self).__init__(
- (('device %s: ' % device) if device else '') +
- 'adb command \'%s\' failed with message: \'%s\'' % (' '.join(cmd), msg))
+ '%s%s' % ('(device: %s) ' % device if device else '', msg))
+
+
+class AdbCommandFailedError(CommandFailedError):
+ """Exception for adb command failures."""
+
+ def __init__(self, cmd, msg, device=None):
+ super(AdbCommandFailedError, self).__init__(
+ 'adb command \'%s\' failed with message: \'%s\'' % (' '.join(cmd), msg),
+ device=device)
class CommandTimeoutError(BaseError):
« no previous file with comments | « build/android/pylib/device/decorators_test.py ('k') | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698