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

Unified Diff: mozdownload/errors.py

Issue 1451373002: Updating mozdownload (excluding tests) (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/mozdownload@master
Patch Set: Updated README.md Created 5 years, 1 month 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 | « mozdownload/cli.py ('k') | mozdownload/factory.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mozdownload/errors.py
diff --git a/mozdownload/errors.py b/mozdownload/errors.py
new file mode 100644
index 0000000000000000000000000000000000000000..4fcf3940dd22335355817f3e91f602d12dd82ba0
--- /dev/null
+++ b/mozdownload/errors.py
@@ -0,0 +1,29 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+
+class NotSupportedError(Exception):
+ """Exception for a build not being supported"""
+ def __init__(self, message):
+ Exception.__init__(self, message)
+
+
+class NotFoundError(Exception):
+ """Exception for a resource not being found (e.g. no logs)"""
+ def __init__(self, message, location):
+ self.location = location
+ Exception.__init__(self, ': '.join([message, location]))
+
+
+class NotImplementedError(Exception):
+ """Exception for a feature which is not implemented yet"""
+ def __init__(self, message):
+ Exception.__init__(self, message)
+
+
+class TimeoutError(Exception):
+ """Exception for a download exceeding the allocated timeout"""
+ def __init__(self):
+ self.message = 'The download exceeded the allocated timeout'
+ Exception.__init__(self, self.message)
« no previous file with comments | « mozdownload/cli.py ('k') | mozdownload/factory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698