Exception handling (WebAssembly)Baseline · Widely available
Exceptions break the normal control flow of execution to represent exceptional behavior, such as an error. You can respond to the exception in JavaScript code.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since May 3, 2022. Widely available since Nov 3, 2024.
Browser support
DesktopChrome
1–94Not supported
95+Supportedsince Oct 19, 2021
Current: 155Edge
12–94Not supported
95+Supportedsince Oct 21, 2021
Current: 154Firefox
1–99Not supported
100+Supportedsince May 3, 2022
Current: 157Safari
1–15.1Not supported
15.2+Supportedsince Dec 13, 2021
Current: 27MobileChrome Android
18–94Not supported
95+Supportedsince Oct 19, 2021
Current: 155Firefox Android
4–99Not supported
100+Supportedsince May 3, 2022
Current: 157Safari iOS
1–15.1Not supported
15.2+Supportedsince Dec 13, 2021
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: Exception.
Feature detection
There’s no simple runtime check for this feature; rely on the support table and test in your target browsers.
Sub-features
Support for each part of the feature (10). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| webassembly.api.Exception | 95 | 95 | 100 | 15.2 | 95 | 100 | 15.2 |
| webassembly.api.Exception.Exception | 95 | 95 | 100 | 15.2 | 95 | 100 | 15.2 |
| webassembly.api.Exception.Exception.options_parameter_traceStack | 95 | 95 | 100 | ✕ | 95 | 100 | ✕ |
| webassembly.api.Exception.getArg | 95 | 95 | 100 | 15.2 | 95 | 100 | 15.2 |
| webassembly.api.Exception.is | 95 | 95 | 100 | 15.2 | 95 | 100 | 15.2 |
| webassembly.api.Exception.stack | 95 | 95 | 100 | ✕ | 95 | 100 | ✕ |
| webassembly.api.Tag | 95 | 95 | 100 | 15.2 | 95 | 100 | 15.2 |
| webassembly.api.Tag.Tag | 95 | 95 | 100 | 15.2 | 95 | 100 | 15.2 |
| webassembly.api.Tag.type | ✕ | ✕ | ✕ | 15.2 | ✕ | ✕ | 15.2 |
| webassembly.exception-handling | 95 | 95 | 100 | 15.2 | 95 | 100 | 15.2 |