mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
This allows printing errors that contain nul characters, for example. Fixes: https://github.com/nodejs/node/issues/28761 Fixes: https://github.com/nodejs/node/issues/31218 PR-URL: https://github.com/nodejs/node/pull/31446 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
12 lines
193 B
JavaScript
12 lines
193 B
JavaScript
'use strict';
|
|
require('../common');
|
|
|
|
function test() {
|
|
const a = 'abc\0def';
|
|
console.error(a);
|
|
throw new Error(a);
|
|
}
|
|
Object.defineProperty(test, 'name', { value: 'fun\0name' });
|
|
|
|
test();
|