Commit ad793ab
n-api: test and doc napi_throw() of a primitive
Ensure that napi_throw() is able to throw a primitive value, and
document that it is able to throw any JavaScript value.
Fixes: nodejs/abi-stable-node#309
PR-URL: #20428
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent da8bc6a commit ad793abCopy full SHA for ad793ab
File tree
Expand file treeCollapse file tree
3 files changed
+23
-2
lines changedOpen diff view settings
Filter options
- doc/api
- test/addons-napi/test_error
Expand file treeCollapse file tree
3 files changed
+23
-2
lines changedOpen diff view settings
Collapse file
+2-2Lines changed: 2 additions & 2 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
344 | 344 | |
345 | 345 | |
346 | 346 | |
347 | | - |
| 347 | + |
348 | 348 | |
349 | 349 | |
350 | 350 | |
351 | | - |
| 351 | + |
352 | 352 | |
353 | 353 | |
354 | 354 | |
|
Collapse file
test/addons-napi/test_error/test.js
Copy file name to clipboardExpand all lines: test/addons-napi/test_error/test.js+12Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
60 | 60 | |
61 | 61 | |
62 | 62 | |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
63 | 75 | |
64 | 76 | |
65 | 77 | |
|
Collapse file
test/addons-napi/test_error/test_error.c
Copy file name to clipboardExpand all lines: test/addons-napi/test_error/test_error.c+9Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
127 | 127 | |
128 | 128 | |
129 | 129 | |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
130 | 138 | |
131 | 139 | |
132 | 140 | |
| ||
137 | 145 | |
138 | 146 | |
139 | 147 | |
| 148 | + |
140 | 149 | |
141 | 150 | |
142 | 151 | |
|
0 commit comments