(nodejs)
| 324 | |
| 325 | |
| 326 | def node_exception_flags(nodejs): |
| 327 | node_version = get_node_version(nodejs) |
| 328 | # Legacy exception handling was enabled by default in node v17. |
| 329 | if node_version and node_version < (17, 0, 0): |
| 330 | return ['--experimental-wasm-eh'] |
| 331 | # Standard exception handling was supported behind flag in node v22. |
| 332 | if node_version and node_version >= (22, 0, 0) and not settings.WASM_LEGACY_EXCEPTIONS: |
| 333 | return ['--experimental-wasm-exnref'] |
| 334 | return [] |
| 335 | |
| 336 | |
| 337 | @memoize |
nothing calls this directly
no test coverage detected