aboutsummaryrefslogtreecommitdiff
path: root/doc/api/report.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/report.md')
-rw-r--r--doc/api/report.md15
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/api/report.md b/doc/api/report.md
index d08de8636a..b39a528639 100644
--- a/doc/api/report.md
+++ b/doc/api/report.md
@@ -445,11 +445,11 @@ the name of a file into which the report is written.
process.report.writeReport('./foo.json');
```
-This function takes an optional additional argument `err` - an `Error` object
-that will be used as the context for the JavaScript stack printed in the report.
-When using report to handle errors in a callback or an exception handler, this
-allows the report to include the location of the original error as well
-as where it was handled.
+This function takes an optional additional argument `err` which is an `Error`
+object that will be used as the context for the JavaScript stack printed in the
+report. When using report to handle errors in a callback or an exception
+handler, this allows the report to include the location of the original error as
+well as where it was handled.
```js
try {
@@ -483,8 +483,9 @@ console.log(typeof report === 'object'); // true
console.log(JSON.stringify(report, null, 2));
```
-This function takes an optional additional argument `err` - an `Error` object
-that will be used as the context for the JavaScript stack printed in the report.
+This function takes an optional additional argument `err`, which is an `Error`
+object that will be used as the context for the JavaScript stack printed in the
+report.
```js
const report = process.report.getReport(new Error('custom error'));