@@ -1687,7 +1687,7 @@ console.log(data);
16871687
16881688Additional documentation is available in the [ report documentation] [ ] .
16891689
1690- ### process.report.setDiagnosticReportOptions ([ options] );
1690+ ### process.report.setOptions ([ options] );
16911691<!-- YAML
16921692added: v11.8.0
16931693-->
@@ -1712,23 +1712,18 @@ are shown below.
17121712
17131713``` js
17141714// Trigger a report on uncaught exceptions or fatal errors.
1715- process .report .setDiagnosticReportOptions ({
1716- events: [' exception' , ' fatalerror' ]
1717- });
1715+ process .report .setOptions ({ events: [' exception' , ' fatalerror' ] });
17181716
17191717// Change the default path and filename of the report.
1720- process .report .setDiagnosticReportOptions ({
1721- filename: ' foo.json' ,
1722- path: ' /home'
1723- });
1718+ process .report .setOptions ({ filename: ' foo.json' , path: ' /home' });
17241719
17251720// Produce the report onto stdout, when generated. Special meaning is attached
17261721// to `stdout` and `stderr`. Usage of these will result in report being written
17271722// to the associated standard streams. URLs are not supported.
1728- process .report .setDiagnosticReportOptions ({ filename: ' stdout' });
1723+ process .report .setOptions ({ filename: ' stdout' });
17291724
17301725// Enable verbose option on report generation.
1731- process .report .setDiagnosticReportOptions ({ verbose: true });
1726+ process .report .setOptions ({ verbose: true });
17321727```
17331728
17341729Signal based report generation is not supported on Windows.
@@ -1742,8 +1737,8 @@ added: v11.8.0
17421737
17431738* ` filename ` {string} Name of the file where the report is written. This
17441739 should be a relative path, that will be appended to the directory specified in
1745- ` process.report.setDiagnosticReportOptions ` , or the current working directory
1746- of the Node.js process, if unspecified.
1740+ ` process.report.setOptions ` , or the current working directory of the Node.js
1741+ process, if unspecified.
17471742* ` err ` {Error} A custom error used for reporting the JavsScript stack.
17481743
17491744* Returns: {string} Returns the filename of the generated report.
0 commit comments