Add error triggering
This commit is contained in:
parent
81dfda5732
commit
d865bac72b
|
@ -257,8 +257,12 @@ Robot.prototype.start = function() {
|
|||
if (!!err) {
|
||||
Logger.fatal("An error occured while trying to start the robot:");
|
||||
Logger.fatal(err);
|
||||
if (typoef(this.error) === 'function') {
|
||||
this.error.call(this, err);
|
||||
}
|
||||
this.emit('error', err);
|
||||
}
|
||||
});
|
||||
}.bind(this));
|
||||
|
||||
return this;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue