Searched refs:isNativeError (Results 1 – 11 of 11) sorted by relevance
/third_party/node/test/parallel/ |
D | test-util.js | 154 assert.strictEqual(util.types.isNativeError(new Error()), true); 155 assert.strictEqual(util.types.isNativeError(new TypeError()), true); 156 assert.strictEqual(util.types.isNativeError(new SyntaxError()), true); 157 assert.strictEqual(util.types.isNativeError(new (context('Error'))()), true); 159 util.types.isNativeError(new (context('TypeError'))()), 163 util.types.isNativeError(new (context('SyntaxError'))()), 166 assert.strictEqual(util.types.isNativeError({}), false); 168 util.types.isNativeError({ name: 'Error', message: '' }), 171 assert.strictEqual(util.types.isNativeError([]), false); 173 util.types.isNativeError(Object.create(Error.prototype)), [all …]
|
D | test-internal-util-helpers.js | 18 assert(!types.isNativeError(fake)); 27 assert(types.isNativeError(err)); 28 assert(!types.isNativeError(newErr)); 34 assert(types.isNativeError(differentRealmErr));
|
/third_party/node/lib/internal/util/ |
D | comparisons.js | 38 isNativeError, 196 } else if (isNativeError(val1) || val1 instanceof Error) { 199 if ((!isNativeError(val2) && !(val2 instanceof Error)) || 252 isNativeError(val2) ||
|
D | inspect.js | 137 isNativeError, 724 assert(isNativeError(err) && err.name === 'ReferenceError' && 1661 assert(isNativeError(err) && err.name === 'ReferenceError');
|
/third_party/node/typings/internalBinding/ |
D | types.d.ts | 13 isNativeError: (value: unknown) => Error;
|
/third_party/node/lib/internal/ |
D | util.js | 65 const { isNativeError } = internalBinding('types'); 100 return isNativeError(e) || e instanceof Error;
|
/third_party/jsframework/runtime/main/extend/systemplugin/napi/ |
D | ohos_util.js | 440 this.isNativeError = function (...args) { method
|
/third_party/node/doc/api/ |
D | util.md | 2498 ### `util.types.isNativeError(value)` 2511 console.log(util.types.isNativeError(new Error())); // true 2512 console.log(util.types.isNativeError(new TypeError())); // true 2513 console.log(util.types.isNativeError(new RangeError())); // true 2520 console.log(util.types.isNativeError(new MyError())); // true 2523 A value being `instanceof` a native error class is not equivalent to `isNativeError()` 2524 returning `true` for that value. `isNativeError()` returns `true` for errors 2532 console.log(util.types.isNativeError(myError)); // true 2536 Conversely, `isNativeError()` returns `false` for all objects which were not 2542 console.log(util.types.isNativeError(myError)); // false [all …]
|
/third_party/node/doc/changelogs/ |
D | CHANGELOG_V18.md | 539 …com/nodejs/node/commit/924dc909b3)] - **doc**: fix typo in util.types.isNativeError() (Julian Dax)… 565 …e/commit/2dd3b0213e)] - **doc**: improve documentation for util.types.isNativeError() (Julian Dax)…
|
D | CHANGELOG_V11.md | 230 …tps://github.com/nodejs/node/commit/169f3f7166)] - **util**: require `isNativeError` from internal…
|
D | CHANGELOG_V8.md | 3767 …https://github.com/nodejs/node/commit/f7383eb80e)] - **test**: verify isNativeError accepts intern…
|