Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 439b95a6 authored by Colin Cross's avatar Colin Cross Committed by android-build-merger
Browse files

Report errors when opening config files am: 15cd21a4 am: aa14355b

am: 2077c151

Change-Id: Ia4e8bda652317eed42a9e559f881eddf5a6ada12
parents 76195554 2077c151
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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())
		}
	}