Skip to content

Commit

Permalink
feat(twconf): add context into validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
CheerlessCloud committed Apr 10, 2018
1 parent 8bc1692 commit 4c62db8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class TwConf {
}

/**
* @param {boolean} [beautify=true] - Sould beautify string.
* @param {boolean} [beautify=true] - Should beautify string.
* @returns {string} - JSON version of config.
*/
toString(beautify = true) {
Expand Down Expand Up @@ -111,7 +111,7 @@ class TwConf {
configField.splitter(validatedValue, key, this.env)
.forEach((newValue, newKey) => this.config.set(newKey, newValue));
} catch (err) {
errors.push(err);
errors.push(EError.wrap(err).combine({ configField, key, value: this.env.get(key) }));
}
});

Expand Down

0 comments on commit 4c62db8

Please sign in to comment.