Skip to content

Commit 9e0a95e

Browse files
committed
fix: improve error phrasing
1 parent 4526824 commit 9e0a95e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎bin/convert-argv.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ module.exports = function(optimist, argv, convertOptions) {
557557
var webpackOptionsValidationErrors = validateWebpackOptions(options);
558558

559559
if(webpackOptionsValidationErrors.length) {
560-
console.error("Configuration is invalid. Fix the following errors:", webpackOptionsValidationErrors);
560+
console.error("Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. The following checks have failed.", webpackOptionsValidationErrors);
561561
process.exit(-1); // eslint-disable-line
562562
}
563563
}

‎lib/WebpackOptionsValidationError.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function WebpackOptionsValidationError(validationErrors) {
66
Error.call(this);
77
Error.captureStackTrace(this, WebpackOptionsValidationError);
88
this.name = "WebpackOptionsValidationError";
9-
this.message = "Passed 'options' object does not look like a valid webpack configuration.";
9+
this.message = "Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. Inspect validationErrors property of the error to learn what checks have failed.";
1010
this.validationErrors = validationErrors;
1111
}
1212
module.exports = WebpackOptionsValidationError;

0 commit comments

Comments
 (0)