[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Error/lineNumber [Back]  [Original]

Error: lineNumber - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

Error: lineNumber

: . . .

Error lineNumber .

In this article

.

Property attributes of Error: lineNumber

lineNumber

js
try {
  throw new Error("Could not parse input");
} catch (err) {
  console.log(err.lineNumber); // 2
}

js
window.addEventListener("error", function (e) {
  console.log(e.lineNumber); // 5
});
const e = new Error("Could not parse input");
throw e;

. .

.


Web Proxy Viewer  |  New URL  |  Original Page