Skip to content

Commit

Permalink
fix(reporter): better errors when loading reporters
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Jun 28, 2013
1 parent 3390a00 commit c645c06
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ var createReporters = function(names, config, emitter, injector) {
try {
reporters.push(injector.createChild([locals], ['reporter:' + name]).get('reporter:' + name));
} catch(e) {
log.warn('Reporter "%s" is not registered!', name);
if (e.message.indexOf('No provider for "reporter:' + name + '"') !== -1) {
log.warn('Can not load "%s", it is not registered!\n ' +
'Perhaps you are missing some plugin?', name);
} else {
log.warn('Can not load "%s"!\n ' + e.stack, name);
}
}
});

Expand Down

0 comments on commit c645c06

Please sign in to comment.