From c645c060c4f381902c2005eefe5b3a7bfa63cdcc Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Thu, 27 Jun 2013 18:53:01 -0700 Subject: [PATCH] fix(reporter): better errors when loading reporters --- lib/reporter.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/reporter.js b/lib/reporter.js index c6a14c044..5d27767eb 100644 --- a/lib/reporter.js +++ b/lib/reporter.js @@ -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); + } } });