Error: columnNumber
The columnNumber data property of an Error instance contains the column number in the line of the file that raised this error.
The columnNumber data property of an Error instance contains the column number in the line of the file that raised this error.
Value
A positive integer.
0
Examples
Using columnNumber
try {
throw new Error("Could not parse input");
} catch (err) {
console.log(err.columnNumber); // 9
}
Specifications
Not part of any standard.
Browser compatibility
See also
- Error.prototype.stack
- Error.prototype.lineNumber
- Error.prototype.fileName