Home
last modified time | relevance | path

Searched refs:isNativeError (Results 1 – 11 of 11) sorted by relevance

/third_party/node/test/parallel/
Dtest-util.js154 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 …]
Dtest-internal-util-helpers.js18 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/
Dcomparisons.js38 isNativeError,
196 } else if (isNativeError(val1) || val1 instanceof Error) {
199 if ((!isNativeError(val2) && !(val2 instanceof Error)) ||
252 isNativeError(val2) ||
Dinspect.js137 isNativeError,
724 assert(isNativeError(err) && err.name === 'ReferenceError' &&
1661 assert(isNativeError(err) && err.name === 'ReferenceError');
/third_party/node/typings/internalBinding/
Dtypes.d.ts13 isNativeError: (value: unknown) => Error;
/third_party/node/lib/internal/
Dutil.js65 const { isNativeError } = internalBinding('types');
100 return isNativeError(e) || e instanceof Error;
/third_party/jsframework/runtime/main/extend/systemplugin/napi/
Dohos_util.js440 this.isNativeError = function (...args) { method
/third_party/node/doc/api/
Dutil.md2498 ### `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/
DCHANGELOG_V18.md539 …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)…
DCHANGELOG_V11.md230 …tps://github.com/nodejs/node/commit/169f3f7166)] - **util**: require `isNativeError` from internal…
DCHANGELOG_V8.md3767 …https://github.com/nodejs/node/commit/f7383eb80e)] - **test**: verify isNativeError accepts intern…