Declare missingModuleError before it's used

This commit is contained in:
Andrew Stewart 2014-06-10 18:37:19 -07:00
parent 3b312def0d
commit 594c73dc60
1 changed files with 9 additions and 9 deletions

View File

@ -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');
};