Commit 44c19b6c authored by Jeff Carpenter's avatar Jeff Carpenter Committed by Commit Bot

Make GN args error more specific

Bug:

Change-Id: I86774c4f6f9712748cc637f4862cce91ee544159
Reviewed-on: https://chromium-review.googlesource.com/462027Reviewed-by: default avatarQuinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Jeff Carpenter <jeffcarp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#460457}
parent 566464f3
......@@ -143,8 +143,10 @@ def _check_configuration_and_target(host, options):
gn_configuration = _read_configuration_from_gn(host, options)
if gn_configuration:
if getattr(options, 'configuration') not in (None, gn_configuration):
raise ValueError('Configuration does not match the GN build args.')
expected_configuration = getattr(options, 'configuration')
if expected_configuration not in (None, gn_configuration):
raise ValueError('Configuration does not match the GN build args. '
'Expected "%s" but got "%s".' % (gn_configuration, expected_configuration))
options.configuration = gn_configuration
return
......
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