1
0
Fork 0
mirror of https://github.com/kbparagua/paloma synced 2023-03-27 23:21:17 -04:00

Don't halt when no Paloma controller is found

This commit is contained in:
kbparagua 2013-10-24 17:39:37 +08:00
parent fc54e48d18
commit 550ed551ea

View file

@ -29,18 +29,22 @@
var Controller = this.factory.get(controllerName);
if (!Controller){
return console.warn('Paloma: undefined controller -> ' + controllerName);
console.warn('Paloma: undefined controller -> ' + controllerName);
continue;
}
var controller = new Controller(request.params);
if (!controller[action]){
return console.warn('Paloma: undefined action <' + action +
'> for <' + controllerName + '> controller');
console.warn('Paloma: undefined action <' + action +
'> for <' + controllerName + '> controller');
continue;
}
controller[action]();
}
this.restart();
};