files/en-us/webassembly/reference/javascript_interface/linkerror/index.md
The WebAssembly.LinkError object indicates an error during module instantiation (besides traps from the start function).
WebAssembly.LinkError()
WebAssembly.LinkError object.Error object. Inherited from {{jsxref("Error")}}.The following snippet creates a new LinkError instance, and logs its details to the console:
try {
throw new WebAssembly.LinkError("Hello", "someFile", 10);
} catch (e) {
console.log(e instanceof LinkError); // true
console.log(e.message); // "Hello"
console.log(e.name); // "LinkError"
console.log(e.fileName); // "someFile"
console.log(e.lineNumber); // 10
console.log(e.columnNumber); // 0
console.log(e.stack); // returns the location where the code was run
}
{{Specifications}}
{{Compat}}