Commit 81843b86 authored by maruel@chromium.org's avatar maruel@chromium.org

Make the exception user-friendly

Review URL: http://codereview.chromium.org/2866017

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@50987 0039d316-1c4b-4281-b951-d872f2087c98
parent 271375b0
......@@ -450,11 +450,15 @@ solutions = [
# Raise a new exception with the human readable message:
raise gclient_utils.Error('\n'.join(error_message))
for s in config_dict.get('solutions', []):
self.dependencies.append(Dependency(
self, s['name'], s['url'],
s.get('safesync_url', None),
s.get('custom_deps', {}),
s.get('custom_vars', {})))
try:
self.dependencies.append(Dependency(
self, s['name'], s['url'],
s.get('safesync_url', None),
s.get('custom_deps', {}),
s.get('custom_vars', {})))
except KeyError:
raise gclient_utils.Error('Invalid .gclient file. Solution is '
'incomplete: %s' % s)
# .gclient can have hooks.
self.deps_hooks = config_dict.get('hooks', [])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment