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. It’s been available across browsers since 2015년 7월.
Error 인스턴스의 message 데이터 속성은 사람이 읽을 수 있는 오류의 설명입니다.
Error() 생성자에 첫 번째 인수로 전달된 값에 해당하는 문자열.
| 쓰기 가능 | 가능 |
| 열거 가능 | 불가능 |
| 설정 가능 | 가능 |
이 속성은 오류가 있거나 설정된 경우 오류에 대한 간략한 설명을 포함합니다. name 속성과 결합된 message 속성은 Error.prototype.toString()메서드에서 오류의 문자열 표현을 생성하는 데 사용됩니다.
기본적으로 message 속성은 빈 문자열이지만, Error 생성자에 대한 첫 번째 인수로 메시지를 지정하여 인스턴스에 대해 이 동작을 재정의할 수 있습니다.
| ECMAScript® 2027 Language Specification # sec-error.prototype.message |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2024년 9월 22일 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.