GeezerVison is showing github.com — doc: revise exit() and run() text in async_hooks.md · nodejs/node@31039db
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/async_hooks.md +6-10Lines changed: 6 additions & 10 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1082,12 +1082,10 @@ This methods runs a function synchronously within a context and return its |
1082 | 1082 | return value. The store is not accessible outside of the callback function or |
1083 | 1083 | the asynchronous operations created within the callback. |
1084 | 1084 |
|
1085 | | -Optionally, arguments can be passed to the function. They will be passed to |
1086 | | -the callback function. |
| 1085 | +The optional `args` are passed to the callback function. |
1087 | 1086 |
|
1088 | | -If the callback function throws an error, it will be thrown by `run` too. |
1089 | | -The stacktrace will not be impacted by this call and the context will |
1090 | | -be exited. |
| 1087 | +If the callback function throws an error, the error is thrown by `run()` too. |
| 1088 | +The stacktrace is not impacted by this call and the context is exited. |
1091 | 1089 |
|
1092 | 1090 | Example: |
1093 | 1091 |
|
@@ -1117,12 +1115,10 @@ return value. The store is not accessible within the callback function or |
1117 | 1115 | the asynchronous operations created within the callback. Any `getStore()` |
1118 | 1116 | call done within the callback function will always return `undefined`. |
1119 | 1117 |
|
1120 | | -Optionally, arguments can be passed to the function. They will be passed to |
1121 | | -the callback function. |
| 1118 | +The optional `args` are passed to the callback function. |
1122 | 1119 |
|
1123 | | -If the callback function throws an error, it will be thrown by `exit` too. |
1124 | | -The stacktrace will not be impacted by this call and the context will be |
1125 | | -re-entered. |
| 1120 | +If the callback function throws an error, the error is thrown by `exit()` too. |
| 1121 | +The stacktrace is not impacted by this call and the context is re-entered. |
1126 | 1122 |
|
1127 | 1123 | Example: |
1128 | 1124 |
|
|