How to use the redis-parser.RedisError.call function in redis-parser

To help you get started, we’ve selected a few redis-parser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NodeRedis / node_redis / lib / customErrors.js View on Github external
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');

    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);
    }
    for (var keys = Object.keys(obj), key = keys.pop(); key; key = keys.pop()) {
        this[key] = obj[key];
    }
}

redis-parser

Javascript Redis protocol (RESP) parser

MIT
Latest version published 7 years ago

Package Health Score

67 / 100
Full package analysis