diff --git a/src/jio/exceptions.js b/src/jio/exceptions.js index ebf5cb8520fb0fec4cb284d6237746d720500bc3..4929fa6a3c3a23b706f28d53f008a538f6709d8e 100644 --- a/src/jio/exceptions.js +++ b/src/jio/exceptions.js @@ -1,64 +1,62 @@ -var jioException = function(spec, my) { - var that = {}; - spec = spec || {}; - my = my || {}; - that.name = 'jioException'; - that.message = spec.message || 'Unknown Reason.'; - that.toString = function() { - return that.name + ': ' + that.message; - }; - return that; +/*jslint indent:2, maxlen: 80, sloppy: true */ +var jioException = function (spec, my) { + var that = {}; + spec = spec || {}; + my = my || {}; + that.name = 'jioException'; + that.message = spec.message || 'Unknown Reason.'; + that.toString = function () { + return that.name + ': ' + that.message; + }; + return that; }; -var invalidCommandState = function(spec, my) { - var that = jioException(spec, my); - spec = spec || {}; - var command = spec.command; - that.name = 'invalidCommandState'; - that.toString = function() { - return that.name +': ' + - command.getLabel() + ', ' + that.message; - }; - return that; +var invalidCommandState = function (spec, my) { + var that = jioException(spec, my), command = spec.command; + spec = spec || {}; + that.name = 'invalidCommandState'; + that.toString = function () { + return that.name + ': ' + + command.getLabel() + ', ' + that.message; + }; + return that; }; -var invalidStorage = function(spec, my) { - var that = jioException(spec, my); - spec = spec || {}; - var type = spec.storage.getType(); - that.name = 'invalidStorage'; - that.toString = function() { - return that.name +': ' + - 'Type "'+type + '", ' + that.message; - }; - return that; +var invalidStorage = function (spec, my) { + var that = jioException(spec, my), type = spec.storage.getType(); + spec = spec || {}; + that.name = 'invalidStorage'; + that.toString = function () { + return that.name + ': ' + + 'Type "' + type + '", ' + that.message; + }; + return that; }; -var invalidStorageType = function(spec, my) { - var that = jioException(spec, my); - var type = spec.type; - that.name = 'invalidStorageType'; - that.toString = function() { - return that.name +': ' + - type + ', ' + that.message; - }; - return that; +var invalidStorageType = function (spec, my) { + var that = jioException(spec, my), type = spec.type; + that.name = 'invalidStorageType'; + that.toString = function () { + return that.name + ': ' + + type + ', ' + that.message; + }; + return that; }; -var jobNotReadyException = function(spec, my) { - var that = jioException(spec, my); - that.name = 'jobNotReadyException'; - return that; +var jobNotReadyException = function (spec, my) { + var that = jioException(spec, my); + that.name = 'jobNotReadyException'; + return that; }; -var tooMuchTriesJobException = function(spec, my) { - var that = jioException(spec, my); - that.name = 'tooMuchTriesJobException'; - return that; +var tooMuchTriesJobException = function (spec, my) { + var that = jioException(spec, my); + that.name = 'tooMuchTriesJobException'; + return that; }; -var invalidJobException = function(spec, my) { - var that = jioException(spec, my); - that.name = 'invalidJobException'; - return that; +var invalidJobException = function (spec, my) { + var that = jioException(spec, my); + that.name = 'invalidJobException'; + return that; };