mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
f72254037e
Handle situations where accessing `.name` or `.stack` on an object fails. Fixes: https://github.com/nodejs/node/issues/25718 PR-URL: https://github.com/nodejs/node/pull/25834 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
11 lines
215 B
JavaScript
11 lines
215 B
JavaScript
'use strict';
|
|
require('../common');
|
|
throw { // eslint-disable-line no-throw-literal
|
|
get stack() {
|
|
throw new Error('weird throw but ok');
|
|
},
|
|
get name() {
|
|
throw new Error('weird throw but ok');
|
|
},
|
|
};
|