MCPcopy Index your code
hub / github.com/nodejs/node / constructor

Method constructor

lib/internal/errors.js:695–715  ·  view source on GitHub ↗

* @param {number} err - A libuv error number * @param {string} syscall * @param {string} address * @param {number} [port]

(err, syscall, address, port)

Source from the content-addressed store, hash-verified

693 * @param {number} [port]
694 */
695 constructor(err, syscall, address, port) {
696 const { 0: code, 1: uvmsg } = uvErrmapGet(err) || uvUnmappedError;
697 const message = `${syscall} ${code}: ${uvmsg}`;
698 let details = '';
699
700 if (port && port > 0) {
701 details = ` ${address}:${port}`;
702 } else if (address) {
703 details = ` ${address}`;
704 }
705
706 super(`${message}${details}`);
707
708 this.code = code;
709 this.errno = err;
710 this.syscall = syscall;
711 this.address = address;
712 if (port) {
713 this.port = port;
714 }
715 }
716
717 get ['constructor']() {
718 return Error;

Callers

nothing calls this directly

Calls 1

uvErrmapGetFunction · 0.85

Tested by

no test coverage detected