process.report.reportOnUncaughtException


如果为 true,未捕获的异常会生成诊断报告。

【If true, a diagnostic report is generated on uncaught exception.】

import { report } from 'node:process';

console.log(`Report on exception: ${report.reportOnUncaughtException}`);const { report } = require('node:process');

console.log(`Report on exception: ${report.reportOnUncaughtException}`);