Declare missingModuleError before it's used
This commit is contained in:
parent
3b312def0d
commit
594c73dc60
18
lib/robot.js
18
lib/robot.js
|
@ -17,6 +17,15 @@ var Connection = require("./connection"),
|
|||
var Async = require("async"),
|
||||
EventEmitter = require('events').EventEmitter;
|
||||
|
||||
var missingModuleError = function(module) {
|
||||
var string = "Cannot find the '" + module + "' module. ";
|
||||
string += "Please install it with 'npm install " + module + "' and try again.";
|
||||
|
||||
console.log(string);
|
||||
|
||||
process.emit('SIGINT');
|
||||
};
|
||||
|
||||
// Public: Creates a new Robot
|
||||
//
|
||||
// opts - object containing Robot options
|
||||
|
@ -408,12 +417,3 @@ Robot.prototype.registerDriver = function(moduleName, driverName) {
|
|||
Robot.prototype.toString = function() {
|
||||
return "[Robot name='" + this.name + "']";
|
||||
};
|
||||
|
||||
var missingModuleError = function(module) {
|
||||
var string = "Cannot find the '" + module + "' module. ";
|
||||
string += "Please install it with 'npm install " + module + "' and try again.";
|
||||
|
||||
console.log(string);
|
||||
|
||||
process.emit('SIGINT');
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue