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

Unified Diff: tools/telemetry/telemetry/core/exceptions.py

Issue 962283002: Telemetry: Add a new class FailureException. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reparent all exceptions. 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/exceptions.py
diff --git a/tools/telemetry/telemetry/core/exceptions.py b/tools/telemetry/telemetry/core/exceptions.py
index 51b91a4068817a85a302f4ba8efaf2b6f493cc29..ed9f9cbdf9d4ce8658a63df86fc98153139d4be9 100644
--- a/tools/telemetry/telemetry/core/exceptions.py
+++ b/tools/telemetry/telemetry/core/exceptions.py
@@ -3,15 +3,25 @@
# found in the LICENSE file.
-class PlatformError(Exception):
+class Error(Exception):
+ """Base class for Telemetry exceptions."""
+ pass
+
+
+class PlatformError(Error):
""" Represents an exception thrown when constructing platform. """
-class TimeoutException(Exception):
+class TimeoutException(Error):
+ """The operation failed to complete because of a timeout.
+
+ It is possible that waiting for a longer period of time would result in a
+ successful operation.
+ """
pass
-class AppCrashException(Exception):
+class AppCrashException(Error):
def __init__(self, app=None, msg=''):
super(AppCrashException, self).__init__(msg)
self._app = app
@@ -50,33 +60,33 @@ class BrowserConnectionGoneException(BrowserGoneException):
super(BrowserConnectionGoneException, self).__init__(app, msg)
-class ProcessGoneException(Exception):
+class ProcessGoneException(Error):
"""Represents a process that no longer exists for an unknown reason."""
-class IntentionalException(Exception):
+class IntentionalException(Error):
"""Represent an exception raised by a unittest which is not printed."""
-class LoginException(Exception):
+class LoginException(Error):
pass
-class EvaluateException(Exception):
+class EvaluateException(Error):
pass
-class ProfilingException(Exception):
+class ProfilingException(Error):
pass
-class PathMissingError(Exception):
+class PathMissingError(Error):
""" Represents an exception thrown when an expected path doesn't exist. """
-class UnknownPackageError(Exception):
+class UnknownPackageError(Error):
""" Represents an exception when encountering an unsupported Android APK. """
-class PackageDetectionError(Exception):
+class PackageDetectionError(Error):
""" Represents an error when parsing an Android APK's package. """
« 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