try {
throw new Error("Could not parse input");
} catch (err) {
console.log(err.lineNumber); // 2
}Error: lineNumber / notebook
Error: lineNumber
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
window.addEventListener("error", (e) => {
console.log(e.lineNumber); // 5
});
const e = new Error("Could not parse input");
throw e;