Shows help message for broken require in scheduler adapter (#7706)

closes #7584

- added help message to assist in debugging broken require
This commit is contained in:
John O'Mahoney 2017-01-16 20:49:41 +00:00 committed by Katharina Irrgang
parent 8d29095fa8
commit 47933c9949

View File

@ -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}));
}
}