Skip to content

Commit

Permalink
fix(launcher): better errors when loading launchers
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Jun 28, 2013
1 parent 74b533b commit 504e848
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 504e848

Please sign in to comment.