diff --git a/lib/customErrors.js b/lib/customErrors.js index 0ffdff400f..d9b34421a7 100644 --- a/lib/customErrors.js +++ b/lib/customErrors.js @@ -1,22 +1,22 @@ 'use strict'; var util = require('util'); -var assert = require('assert') -var RedisError = require('redis-parser').RedisError -var ADD_STACKTRACE = false +var assert = require('assert'); +var RedisError = require('redis-parser').RedisError; +var ADD_STACKTRACE = false; function AbortError (obj, stack) { - assert(obj, 'The options argument is required') - assert.strictEqual(typeof obj, 'object', 'The options argument has to be of type object') + assert(obj, 'The options argument is required'); + assert.strictEqual(typeof obj, 'object', 'The options argument has to be of type object'); - RedisError.call(this, obj.message, ADD_STACKTRACE) + RedisError.call(this, obj.message, ADD_STACKTRACE); Object.defineProperty(this, 'message', { value: obj.message || '', configurable: true, writable: true }); if (stack || stack === undefined) { - Error.captureStackTrace(this, AbortError) + Error.captureStackTrace(this, AbortError); } for (var keys = Object.keys(obj), key = keys.pop(); key; key = keys.pop()) { this[key] = obj[key]; @@ -24,10 +24,10 @@ function AbortError (obj, stack) { } function AggregateError (obj) { - assert(obj, 'The options argument is required') - assert.strictEqual(typeof obj, 'object', 'The options argument has to be of type object') + assert(obj, 'The options argument is required'); + assert.strictEqual(typeof obj, 'object', 'The options argument has to be of type object'); - AbortError.call(this, obj, ADD_STACKTRACE) + AbortError.call(this, obj, ADD_STACKTRACE); Object.defineProperty(this, 'message', { value: obj.message || '', configurable: true,