| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.
* Some parts of this feature may have varying levels of support.
SyntaxError .
JavaScript .
SyntaxError structuredClone() postMessage() Worker .
SyntaxError Error .
SyntaxError() SyntaxError .
Error .
SyntaxError.prototype , SyntaxError .
SyntaxError.prototype.constructor . SyntaxError SyntaxError .
SyntaxError.prototype.name . SyntaxError.prototype.name "SyntaxError".
Error .
SyntaxError try {
eval("hoo bar");
} catch (e) {
console.log(e instanceof SyntaxError); // true
console.log(e.message);
console.log(e.name); // "SyntaxError"
console.log(e.stack); //
}
try {
throw new SyntaxError("Hello");
} catch (e) {
console.log(e instanceof SyntaxError); // true
console.log(e.message); // "Hello"
console.log(e.name); // "SyntaxError"
console.log(e.stack); //
}
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-native-error-types-used-in-this-standard-syntaxerror |
This page was last modified on 2023 8 14 by MDN contributors.
SyntaxErrorErrorObject/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()AggregateErrorEvalErrorInternalErrorRangeErrorReferenceErrorTypeErrorURIErrorYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |