mirror of
https://github.com/nodejs/node.git
synced 2025-05-17 23:45:33 +00:00
![]() Adds a new method signature variant for process.emitWarning() that accepts an options object. The options object may include a new `detail` option that allows additional detail text to be associated with the warning. By default, this additional text will be printed to stderr along with the warning, and included on the Warning Error object using the `.detail` property. e.g. ```js process.emitWarning('A message', { code: 'WARNING123', detail: 'This is additional detail' }); // Emits: // (node {pid}) [WARNING123] Warning: A message // This is additional detail ``` PR-URL: https://github.com/nodejs/node/pull/12725 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> |
||
---|---|---|
.. | ||
next_tick.js | ||
promises.js | ||
stdio.js | ||
warning.js | ||
write-coverage.js |