Skip to main content

writeReport

method ProcessReport.writeReport
Jump to headingProcessReport.writeReport(
fileName?: string,
err?: Error,
): string

Writes a diagnostic report to a file. If filename is not provided, the default filename includes the date, time, PID, and a sequence number. The report's JavaScript stack trace is taken from err, if present.

If the value of filename is set to 'stdout' or 'stderr', the report is written to the stdout or stderr of the process respectively.

Parameters Jump to heading

optional
Jump to headingfileName: string

Name of the file where the report is written. This should be a relative path, that will be appended to the directory specified in process.report.directory, or the current working directory of the Node.js process, if unspecified.

optional
Jump to headingerr: Error

A custom error used for reporting the JavaScript stack.

Return Type Jump to heading

string

Filename of the generated report.

Jump to headingProcessReport.writeReport(err?: Error): string

Parameters Jump to heading

optional
Jump to headingerr: Error

Return Type Jump to heading

string
Back to top