PHP 8.2.30
Preview: error.js Size: 1.21 KB
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/node_modules/commander/lib/error.js

// @ts-check

/**
 * CommanderError class
 * @class
 */
class CommanderError extends Error {
  /**
   * Constructs the CommanderError class
   * @param {number} exitCode suggested exit code which could be used with process.exit
   * @param {string} code an id string representing the error
   * @param {string} message human-readable description of the error
   * @constructor
   */
  constructor(exitCode, code, message) {
    super(message);
    // properly capture stack trace in Node.js
    Error.captureStackTrace(this, this.constructor);
    this.name = this.constructor.name;
    this.code = code;
    this.exitCode = exitCode;
    this.nestedError = undefined;
  }
}

/**
 * InvalidArgumentError class
 * @class
 */
class InvalidArgumentError extends CommanderError {
  /**
   * Constructs the InvalidArgumentError class
   * @param {string} [message] explanation of why argument is invalid
   * @constructor
   */
  constructor(message) {
    super(1, 'commander.invalidArgument', message);
    // properly capture stack trace in Node.js
    Error.captureStackTrace(this, this.constructor);
    this.name = this.constructor.name;
  }
}

exports.CommanderError = CommanderError;
exports.InvalidArgumentError = InvalidArgumentError;

Directory Contents

Dirs: 0 × Files: 6

Name Size Perms Modified Actions
3.10 KB lrw-r--r-- 2026-02-28 00:26:46
Edit Download
68.40 KB lrw-r--r-- 2026-02-28 00:27:06
Edit Download
1.21 KB lrw-r--r-- 2026-02-28 00:27:18
Edit Download
13.95 KB lrw-r--r-- 2026-02-28 00:27:28
Edit Download
8.45 KB lrw-r--r-- 2026-02-28 00:27:44
Edit Download
2.70 KB lrw-r--r-- 2026-02-28 00:27:48
Edit Download

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