diff options
author | Colin Cross <ccross@android.com> | 2018-02-27 22:31:05 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-02-27 22:31:05 +0000 |
commit | 439b95a68b7dd34d2eb0e2b5d199d4a7a58f1e03 (patch) | |
tree | 3ea85d06043a0bdd4476b12088baab30fc82a64c /android | |
parent | 761955541f2130739454192baebc3e8c99f628a9 (diff) | |
parent | 2077c1515082549188145ca258b820b24884fdad (diff) | |
download | build_soong-439b95a68b7dd34d2eb0e2b5d199d4a7a58f1e03.tar.gz build_soong-439b95a68b7dd34d2eb0e2b5d199d4a7a58f1e03.tar.bz2 build_soong-439b95a68b7dd34d2eb0e2b5d199d4a7a58f1e03.zip |
Report errors when opening config files am: 15cd21a492 am: aa14355b6a
am: 2077c15150
Change-Id: Ia4e8bda652317eed42a9e559f881eddf5a6ada12
Diffstat (limited to 'android')
-rw-r--r-- | android/config.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/android/config.go b/android/config.go index 1a0b45a5..b158e051 100644 --- a/android/config.go +++ b/android/config.go @@ -132,12 +132,14 @@ func loadFromConfigFile(configurable jsonConfigurable, filename string) error { if err != nil { return err } + } else if err != nil { + return fmt.Errorf("config file: could not open %s: %s", filename, err.Error()) } else { // Make a decoder for it jsonDecoder := json.NewDecoder(configFileReader) err = jsonDecoder.Decode(configurable) if err != nil { - return fmt.Errorf("config file: %s did not parse correctly: "+err.Error(), filename) + return fmt.Errorf("config file: %s did not parse correctly: %s", filename, err.Error()) } } |