WebAssembly.CompileError()
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since â¨2017ë 10ìâ©.
**WebAssembly.CompileError()**ìì±ìë WebAssembly ëì½ë© ëë ì í¨ì± ê²ì¬ ì¤ì ë°ìí ì¤ë¥ë¥¼ ëíë´ë WebAssembly CompileError ê°ì²´ë¥¼ ìë¡ ë§ëëë¤.
Syntax
new WebAssembly.CompileError(message, fileName, lineNumber);
Parameters
messageOptional-
ì¬ëì´ ì½ìì ìë ííì ìë¬ì ëí ì¤ëª .
fileNameOptional ë¹íì¤-
ìì¸ì ìì¸ì´ ë ì½ëê° ë¤ì´ìë íì¼ì ì´ë¦ì ëë¤.
lineNumberOptional ë¹íì¤-
ìì¸ì ìì¸ì´ ë ì½ëì í ë²í¸ì ëë¤.
Properties
CompileError ìì±ììë ê³ ì í ê³ ì ìì±ì´ ìì§ë§ íë¡í íì
ì²´ì¸ì íµí´ ì¼ë¶ ìì±ì ììí©ëë¤.
WebAssembly.CompileError.prototype.constructor-
ì¸ì¤í´ì¤ì íë¡í íì ì ìì±í í¨ì를 ì§ì í©ëë¤.
WebAssembly.CompileError.prototype.message-
ìë¬ ë©ìì§. ECMA-262ë
URIErrorê° SpiderMonkeyìì ìì²´messageìì±ì ì ê³µíëë¡ ì§ì íì§ë§Error.prototype.message를 ììë°ìµëë¤. WebAssembly.CompileError.prototype.name-
ìë¬ ëª ì¹.
Errorìì ììí©ëë¤. WebAssembly.CompileError.prototype.fileName-
ìë¬ê° ë°ìí íì¼ì ê²½ë¡.
Errorìì ììí©ëë¤. WebAssembly.CompileError.prototype.lineNumber-
ìë¬ê° ë°ìí íì¼ì ì½ë ì¤ë²í¸.
Errorìì ììí©ëë¤. WebAssembly.CompileError.prototype.columnNumber-
ìë¬ê° ë°ìí ì¤ì ì´ ë²í¸.
Errorìì ììí©ëë¤. WebAssembly.CompileError.prototype.stack-
ì¤í ì¶ì .
Errorìì ììí©ëë¤.
Methods
CompileError ìì±ììë ìì²´ ë©ìëê° ìì§ë§ íë¡í íì
ì²´ì¸ì íµí´ ì¼ë¶ ë©ìë를 ììí©ëë¤.
WebAssembly.CompileError.prototype.toSource()-
ëì¼í ì¤ë¥ë¡ íë¨í ì ìë ì½ë를 ë°íí©ëë¤.
Errorìì ììí©ëë¤. WebAssembly.CompileError.prototype.toString()-
ì§ì ë Error ê°ì²´ë¥¼ ëíë´ë 문ìì´ì ë°íí©ëë¤.
Errorìì ììí©ëë¤.
Examples
ë¤ì ì¤ ëí«ì ì CompileError ì¸ì¤í´ì¤ë¥¼ ë§ë¤ê³ ì½ìì ì¸ë¶ ì 보를 기ë¡í©ëë¤.
try {
throw new WebAssembly.CompileError("Hello", "someFile", 10);
} catch (e) {
console.log(e instanceof CompileError); // true
console.log(e.message); // "Hello"
console.log(e.name); // "CompileError"
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
}
ëª ì¸ì
| Specification |
|---|
| WebAssembly JavaScript Interface > # exceptiondef-compileerror > |
| ECMAScript® 2026 Language Specification > # sec-native-error-types-used-in-this-standard > |