All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.utilities.error.js Maven / Gradle / Ivy

There is a newer version: 19.0.0
Show newest version
"use strict";
/**
 * @license
 * Copyright Google LLC All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.dev/license
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.assertIsError = assertIsError;
const assert_1 = __importDefault(require("assert"));
function assertIsError(value) {
    const isError = value instanceof Error ||
        // The following is needing to identify errors coming from RxJs.
        (typeof value === 'object' && value && 'name' in value && 'message' in value);
    (0, assert_1.default)(isError, 'catch clause variable is not an Error instance');
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy