Skip to content

Commit

Permalink
Shows help message for broken require in scheduler adapter (#7706)
Browse files Browse the repository at this point in the history
closes #7584

- added help message to assist in debugging broken require
  • Loading branch information
John O'Mahoney authored and kirrg001 committed Jan 16, 2017
1 parent 8d29095 commit 47933c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/server/scheduling/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ exports.createAdapter = function (options) {
}
// CASE: if module not found it can be an error within the adapter (cannot find bluebird for example)
else if (err.code === 'MODULE_NOT_FOUND' && err.message.indexOf(contentPath + activeAdapter) === -1) {
return Promise.reject(new errors.IncorrectUsageError({err: err}));
return Promise.reject(new errors.IncorrectUsageError({err: err, help: 'Please check the imports are valid in ' + contentPath + activeAdapter}));
}
}

Expand Down

0 comments on commit 47933c9

Please sign in to comment.