From 594c73dc601c3ace1819879e9ccf47f2f20d2704 Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Tue, 10 Jun 2014 18:37:19 -0700 Subject: [PATCH] Declare missingModuleError before it's used --- lib/robot.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/robot.js b/lib/robot.js index 52d7d3d..fd4d10f 100644 --- a/lib/robot.js +++ b/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'); -};