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

Side by Side Diff: tools/telemetry/catapult_base/dependency_manager/exceptions.py

Issue 1599413006: Remove catapult_base from telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@perf_cb_move
Patch Set: Created 4 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from catapult_base import cloud_storage
6
7 class UnsupportedConfigFormatError(ValueError):
8 def __init__(self, config_type, config_file):
9 if not config_type:
10 message = ('The json file at %s is unsupported by the dependency_manager '
11 'due to no specified config type' % config_file)
12 else:
13 message = ('The json file at %s has config type %s, which is unsupported '
14 'by the dependency manager.' % (config_file, config_type))
15 super(UnsupportedConfigFormatError, self).__init__(message)
16
17
18 class EmptyConfigError(ValueError):
19 def __init__(self, file_path):
20 super(EmptyConfigError, self).__init__('Empty config at %s.' % file_path)
21
22
23 class FileNotFoundError(Exception):
24 def __init__(self, file_path):
25 super(FileNotFoundError, self).__init__('No file found at %s' % file_path)
26
27
28 class NoPathFoundError(Exception):
29 def __init__(self, dependency, platform):
30 super(NoPathFoundError, self).__init__(
31 'No file could be found locally, and no file to download from cloud '
32 'storage for %s on platform %s' % (dependency, platform))
33
34
35 class ReadWriteError(Exception):
36 pass
37
38
39 class CloudStorageUploadConflictError(cloud_storage.CloudStorageError):
40 def __init__(self, bucket, path):
41 super(CloudStorageUploadConflictError, self).__init__(
42 'File location %s already exists in bucket %s' % (path, bucket))
43
44
45 class ArchiveError(Exception):
46 def __init__(self, msg):
47 super(ArchiveError, self).__init__(msg)
48
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698