-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy patherror.js
20 lines (20 loc) · 852 Bytes
/
error.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"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 node_assert_1 = __importDefault(require("node: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, node_assert_1.default)(isError, 'catch clause variable is not an Error instance');
}