If bad start detected, shut down the Robot
This commit is contained in:
parent
42ca88f8d0
commit
5354102c2e
12
lib/robot.js
12
lib/robot.js
|
@ -295,11 +295,15 @@ Robot.prototype.start = function(callback) {
|
||||||
Logger.fatal("An error occured while trying to start the robot:");
|
Logger.fatal("An error occured while trying to start the robot:");
|
||||||
Logger.fatal(err);
|
Logger.fatal(err);
|
||||||
|
|
||||||
if (typeof(this.error) === "function") {
|
this.halt(function() {
|
||||||
this.error.call(this, err);
|
if (typeof(this.error) === "function") {
|
||||||
}
|
this.error.call(this, err);
|
||||||
|
}
|
||||||
|
|
||||||
this.emit("error", err);
|
if (this.listeners("error").length) {
|
||||||
|
this.emit("error", err);
|
||||||
|
}
|
||||||
|
}.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_.isFunction(callback)) {
|
if (_.isFunction(callback)) {
|
||||||
|
|
Loading…
Reference in New Issue