• err {Error} A custom error used for reporting the JavaScript stack.
    • Returns: {Object}

    Returns a JavaScript Object representation of a diagnostic report for the running process. The report’s JavaScript stack trace is taken from err, if present.

    1. const data = process.report.getReport();
    2. console.log(data.header.nodejsVersion);
    3. // Similar to process.report.writeReport()
    4. const fs = require('fs');
    5. fs.writeFileSync(util.inspect(data), 'my-report.log', 'utf8');

    Additional documentation is available in the [report documentation][].