Usage in Deno
import { type ProcessReport } from "node:process";
directory: string
Directory where the report is written. working directory of the Node.js process.
filename: string
Filename where the report is written. The default value is the empty string.
reportOnFatalError: boolean
If true, a diagnostic report is generated on fatal errors, such as out of memory errors or failed C++ assertions.
reportOnSignal: boolean
If true, a diagnostic report is generated when the process receives the signal specified by process.report.signal.
reportOnUncaughtException: boolean
If true, a diagnostic report is generated on uncaught exception.
getReport(err?: Error): string
Returns a JSON-formatted diagnostic report for the running process. The report's JavaScript stack trace is taken from err, if present.
writeReport(fileName?: string): 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.
writeReport(error?: Error): string
writeReport(fileName?: string,err?: Error,): string