|
1 | 1 | 'use strict';
|
2 | 2 |
|
3 | 3 | var util = require('util');
|
4 |
| -var assert = require('assert') |
5 |
| -var RedisError = require('redis-parser').RedisError |
6 |
| -var ADD_STACKTRACE = false |
| 4 | +var assert = require('assert'); |
| 5 | +var RedisError = require('redis-parser').RedisError; |
| 6 | +var ADD_STACKTRACE = false; |
7 | 7 |
|
8 | 8 | function AbortError (obj, stack) {
|
9 |
| - assert(obj, 'The options argument is required') |
10 |
| - assert.strictEqual(typeof obj, 'object', 'The options argument has to be of type object') |
| 9 | + assert(obj, 'The options argument is required'); |
| 10 | + assert.strictEqual(typeof obj, 'object', 'The options argument has to be of type object'); |
11 | 11 |
|
12 |
| - RedisError.call(this, obj.message, ADD_STACKTRACE) |
| 12 | + RedisError.call(this, obj.message, ADD_STACKTRACE); |
13 | 13 | Object.defineProperty(this, 'message', {
|
14 | 14 | value: obj.message || '',
|
15 | 15 | configurable: true,
|
16 | 16 | writable: true
|
17 | 17 | });
|
18 | 18 | if (stack || stack === undefined) {
|
19 |
| - Error.captureStackTrace(this, AbortError) |
| 19 | + Error.captureStackTrace(this, AbortError); |
20 | 20 | }
|
21 | 21 | for (var keys = Object.keys(obj), key = keys.pop(); key; key = keys.pop()) {
|
22 | 22 | this[key] = obj[key];
|
23 | 23 | }
|
24 | 24 | }
|
25 | 25 |
|
26 | 26 | function AggregateError (obj) {
|
27 |
| - assert(obj, 'The options argument is required') |
28 |
| - assert.strictEqual(typeof obj, 'object', 'The options argument has to be of type object') |
| 27 | + assert(obj, 'The options argument is required'); |
| 28 | + assert.strictEqual(typeof obj, 'object', 'The options argument has to be of type object'); |
29 | 29 |
|
30 |
| - AbortError.call(this, obj, ADD_STACKTRACE) |
| 30 | + AbortError.call(this, obj, ADD_STACKTRACE); |
31 | 31 | Object.defineProperty(this, 'message', {
|
32 | 32 | value: obj.message || '',
|
33 | 33 | configurable: true,
|
|
0 commit comments