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.
5 class UnsupportedConfigFormatError(ValueError):
6 def __init__(self
, config_type
, config_file
):
8 message
= ('The json file at %s is unsupported by the dependency_manager '
9 'due to no specified config type' % config_file
)
11 message
= ('The json file at %s has config type %s, which is unsupported '
12 'by the dependency manager.' % (config_file
, config_type
))
13 super(UnsupportedConfigFormatError
, self
).__init
__(message
)
15 class EmptyConfigError(ValueError):
16 def __init__(self
, file_path
):
17 super(EmptyConfigError
, self
).__init
__('Empty config at %s.' % file_path
)
20 class FileNotFoundError(Exception):
21 def __init__(self
, file_path
):
22 super(FileNotFoundError
, self
).__init
__('No file found at %s' % file_path
)
25 class NoPathFoundError(Exception):
26 def __init__(self
, dependency
, platform
):
27 super(NoPathFoundError
, self
).__init
__(
28 'No file could be found locally, and no file to download from cloud '
29 'storage for %s on platform %s' % (dependency
, platform
))
31 class ReadWriteError(Exception):