Error: fileName

비표준: 이 기능은 비표준이므로 실제 프로덕션에서 사용하지 마세요. 모든 사용자 환경에서 작동하지 않을 수 도 있으며, 미래에 호환성 문제가 생길 수 있습니다.

Error 인스턴스의 fileName 데이터 속성은 이 오류가 발생한 파일의 경로를 포함합니다.

문자열.

Property attributes of Error: fileName
쓰기 가능가능
열거 가능불가능
설정 가능가능

설명

이 비표준 속성은 이 오류가 발생한 파일의 경로를 포함합니다. 디버거 컨텍스트(예를 들어 Firefox 개발자 도구)에서 호출할 경우, "debugger eval code" 가 반환됩니다.

예제

fileName 사용하기

js
const e = new Error("Could not parse input");
throw e;
// e.fileName은 "file:///C:/example.html" 처럼 보일 수 있습니다.

명세

표준의 일부가 아닙니다.

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
fileName
Non-standard

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Non-standard. Check cross-browser support before using.

같이 보기