Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Error handling for the case when a launcher is not found by name, and…

… print a warning to the debug log #61.
  • Loading branch information...
commit 3df8d72395b41d3d2cfb8f4f78f253518b403dc5 1 parent e739da3
@airportyh authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 lib/config.js
View
11 lib/config.js
@@ -151,9 +151,16 @@ Config.prototype.getWantedLauncherNames = function(available){
}
Config.prototype.getWantedLaunchers = function(available){
- return this.getWantedLauncherNames(available).map(function(name){
- return available[name.toLowerCase()]
+ var launchers = []
+ this.getWantedLauncherNames(available).forEach(function(name){
+ var launcher = available[name.toLowerCase()]
+ if (!launcher){
+ log.warn('Launcher "' + name + '" is not recognized.')
+ }else{
+ launchers.push(launcher)
+ }
})
+ return launchers
}
Config.prototype.printLauncherInfo = function(){
Please sign in to comment.
Something went wrong with that request. Please try again.