PHP 8.2.30
Preview: errors.js Size: 1.36 KB
//opt/alt/alt-nodejs20/root/lib/node_modules/npm/node_modules.bundled/@npmcli/agent/lib/errors.js

'use strict'

class InvalidProxyProtocolError extends Error {
  constructor (url) {
    super(`Invalid protocol \`${url.protocol}\` connecting to proxy \`${url.host}\``)
    this.code = 'EINVALIDPROXY'
    this.proxy = url
  }
}

class ConnectionTimeoutError extends Error {
  constructor (host) {
    super(`Timeout connecting to host \`${host}\``)
    this.code = 'ECONNECTIONTIMEOUT'
    this.host = host
  }
}

class IdleTimeoutError extends Error {
  constructor (host) {
    super(`Idle timeout reached for host \`${host}\``)
    this.code = 'EIDLETIMEOUT'
    this.host = host
  }
}

class ResponseTimeoutError extends Error {
  constructor (request, proxy) {
    let msg = 'Response timeout '
    if (proxy) {
      msg += `from proxy \`${proxy.host}\` `
    }
    msg += `connecting to host \`${request.host}\``
    super(msg)
    this.code = 'ERESPONSETIMEOUT'
    this.proxy = proxy
    this.request = request
  }
}

class TransferTimeoutError extends Error {
  constructor (request, proxy) {
    let msg = 'Transfer timeout '
    if (proxy) {
      msg += `from proxy \`${proxy.host}\` `
    }
    msg += `for \`${request.host}\``
    super(msg)
    this.code = 'ETRANSFERTIMEOUT'
    this.proxy = proxy
    this.request = request
  }
}

module.exports = {
  InvalidProxyProtocolError,
  ConnectionTimeoutError,
  IdleTimeoutError,
  ResponseTimeoutError,
  TransferTimeoutError,
}

Directory Contents

Dirs: 0 × Files: 6

Name Size Perms Modified Actions
5.79 KB lrw-r--r-- 2026-02-23 03:24:42
Edit Download
1.22 KB lrw-r--r-- 2026-02-23 03:24:42
Edit Download
1.36 KB lrw-r--r-- 2026-02-23 03:24:42
Edit Download
1.23 KB lrw-r--r-- 2026-02-23 03:24:42
Edit Download
2.38 KB lrw-r--r-- 2026-02-23 03:24:42
Edit Download
1.96 KB lrw-r--r-- 2026-02-23 03:24:42
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).