How to use the verror.WError.call function in verror

To help you get started, we’ve selected a few verror 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 mcavage / node-fast / lib / client.js View on Github external
function ConnectionClosedError(msg) {
    WError.call(this, msg || 'the underlying connection has been closed');
}
util.inherits(ConnectionClosedError, WError);
github mcavage / node-fast / lib / protocol / message_decoder.js View on Github external
function ChecksumError(exp, actual, msg) {
    WError.call(this, {}, 'checksum error(%d): caclulated %d', exp, actual);

    this.context = {
        expected_crc: exp,
        actual_crc: actual,
        message: msg
    };
    this.name = this.constructor.name;
}
util.inherits(ChecksumError, WError);
github mcavage / node-fast / lib / client.js View on Github external
function NoConnectionError() {
    WError.call(this, 'no connection');
}
util.inherits(NoConnectionError, WError);
github mcavage / node-fast / lib / client.js View on Github external
function DNSError(err, host) {
    WError.call(this, err, host + ' could not be found in DNS');
}
util.inherits(DNSError, WError);
github mcavage / node-fast / lib / protocol / message_decoder.js View on Github external
function InvalidContentError(cause, msg) {
    WError.call(this, cause, 'invalid JSON encountered');

    this.context = {
        message: msg
    };
    this.name = this.constructor.name;
}
util.inherits(InvalidContentError, WError);
github mcavage / node-fast / lib / client.js View on Github external
function UnsolicitedMessageError(message) {
    WError.call(this, 'unsolicited message');
    this.msg = message;
}
util.inherits(UnsolicitedMessageError, WError);
github mcavage / node-fast / lib / client.js View on Github external
function ConnectionTimeoutError(time) {
    WError.call(this, 'failed to establish connection after %dms', time);
}
util.inherits(ConnectionTimeoutError, WError);