HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/design.system/node_modules/@rushstack/node-core-library/lib/InternalError.js
"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.InternalError = void 0;
/**
 * An `Error` subclass that should be thrown to report an unexpected state that may indicate a software defect.
 * An application may handle this error by instructing the end user to report an issue to the application maintainers.
 *
 * @remarks
 * Do not use this class unless you intend to solicit bug reports from end users.
 *
 * @public
 */
class InternalError extends Error {
    /**
     * Constructs a new instance of the {@link InternalError} class.
     *
     * @param message - A message describing the error.  This will be assigned to
     * {@link InternalError.unformattedMessage}.  The `Error.message` field will have additional boilerplate
     * explaining that the user has encountered a software defect.
     */
    constructor(message) {
        super(InternalError._formatMessage(message));
        // Manually set the prototype, as we can no longer extend built-in classes like Error, Array, Map, etc.
        // https://github.com/microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
        //
        // Note: the prototype must also be set on any classes which extend this one
        this.__proto__ = InternalError.prototype; // eslint-disable-line @typescript-eslint/no-explicit-any
        this.unformattedMessage = message;
        if (InternalError.breakInDebugger) {
            // eslint-disable-next-line no-debugger
            debugger;
        }
    }
    static _formatMessage(unformattedMessage) {
        return (`Internal Error: ${unformattedMessage}\n\nYou have encountered a software defect. Please consider` +
            ` reporting the issue to the maintainers of this application.`);
    }
    /** @override */
    toString() {
        return this.message; // Avoid adding the "Error:" prefix
    }
}
exports.InternalError = InternalError;
/**
 * If true, a JavScript `debugger;` statement will be invoked whenever the `InternalError` constructor is called.
 *
 * @remarks
 * Generally applications should not be catching and ignoring an `InternalError`.  Instead, the error should
 * be reported and typically the application will terminate.  Thus, if `InternalError` is constructed, it's
 * almost always something we want to examine in a debugger.
 */
InternalError.breakInDebugger = true;
//# sourceMappingURL=InternalError.js.map