Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since October 2017.
The WebAssembly.CompileError object indicates an error during WebAssembly decoding or validation.
Creates a new WebAssembly.CompileError object.
Error message. Inherited from Error.
WebAssembly.CompileError.prototype.nameError name. Inherited from Error.
WebAssembly.CompileError.prototype.causeError cause. Inherited from Error.
WebAssembly.CompileError.prototype.fileNamePath to file that raised this error. Inherited from Error.
WebAssembly.CompileError.prototype.lineNumberLine number in file that raised this error. Inherited from Error.
WebAssembly.CompileError.prototype.columnNumberColumn number in line that raised this error. Inherited from Error.
WebAssembly.CompileError.prototype.stackStack trace. Inherited from Error.
Returns a string representing the specified Error object. Inherited from Error.
The following snippet creates a new CompileError instance, and logs its details to the console:
| WebAssembly JavaScript Interface # exceptiondef-compileerror |
| ECMAScript® 2027 Language Specification # sec-native-error-types-used-in-this-standard |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Apr 22, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.