From 504e848cf66b065380fa72e07f5337ae2d6e35b5 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Thu, 27 Jun 2013 18:52:30 -0700 Subject: [PATCH] fix(launcher): better errors when loading launchers --- lib/launcher.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/launcher.js b/lib/launcher.js index ee10063fb..44996cb14 100644 --- a/lib/launcher.js +++ b/lib/launcher.js @@ -24,8 +24,13 @@ var Launcher = function(emitter, injector) { try { browser = injector.createChild([locals], ['launcher:' + name]).get('launcher:' + name); } catch (e) { - // TODO(vojta): throw other exceptions (dep not provided, etc.) - log.warn('Launcher "%s" is not registered!', name); + if (e.message.indexOf('No provider for "launcher:' + 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); + } + return; }