JavaScript Error.prototype.columnNumber property Last Updated : 10 Feb, 2023 Comments Improve Suggest changes Like Article Like Report The columnNumber is a non-standard property that contains the column number of the line at which the error was raised. It is recommended to not use this property on production sites facing the web, as it may not work for every user. Use: This property is useful while creating an error object. If the column number is undefined for any error object, you can define it manually. Syntax: error.columnNumber Example 1: JavaScript try { // Creating a new error object var err = new Error ("Format not supported","filename",0); if(err.columnNumber == undefined) err.columnNumber = 0; throw err; } catch(e) { // Printing error message console.log ("Error: " + e.message); // Printing column number of line // at which error was raised console.log ("At Column number: " + e.columnNumber); } Output: Error: Format not supported At Column number: 0 Example 2: JavaScript try { // Creating new error object var err = new Error ("Unexpected token output","filename",0); if(err.columnNumber == undefined) err.columnNumber = 0; throw err; } catch(e) { // Printing error message console.log ("Error: " + e.message); // Printing column number of line // at which this error was raised console.log ("At Column number: " + e.columnNumber); } Output: Error: Unexpected token output At Column number: 0 Browser compatibility(Desktop): Firefox Browser compatibility(Mobile): Firefox for Android We have a complete list of Javascript Errors, to check those please go through the JavaScript Error Object Complete Reference article. Comment More infoAdvertise with us Next Article JavaScript Error.prototype.columnNumber property A abhinavjain194 Follow Improve Article Tags : JavaScript Web Technologies JavaScript-Properties JavaScript-Errors Similar Reads JavaScript Error.prototype.stack Property To handle any error which occurs while execution, the methods of error handling are used. In these methods, the type of error where it is raised and reasons are given in a definite order or sequence. Stack Structures are used to store these sequences. In JavaScript, all errors and their details are 3 min read JavaScript Error.prototype.fileName Property The fileName is a non-standard property that contains the path of the file that raised this error. It is recommended to not use this property on production sites facing the web, as it may not work for every user. If called from the Firefox Developer Tools, "debugger eval code" is returned. This prop 2 min read JavaScript Error.prototype.lineNumber Property In JavaScript, the Error.prototype.lineNumber property helps us to determine which line in our code corresponds to an error. One important thing to note is that this property is not used extensively as it is not a standard feature. Syntax:errorVariable.lineNumber Example 1: JavaScript var ex_variab 1 min read JavaScript Error name Property In JavaScript, the Error name property is used to set or return the name of an error. Syntax: errorObj.name Property values: This property contains six different values as described below: SyntaxError: It represents a syntax error.RangeError: It represents an error in the range.ReferenceError: It re 2 min read JavaScript Error.prototype.toString() Method The Error.prototype.toString() method is an inbuilt method in JavaScript that is used to return a string representing the specified Error object. Syntax: e.toString() Parameters: This method does not accept any parameters. Return value: This method returns a string representing the specified Error o 1 min read JavaScript Error Object Complete Reference Error objects are arising at runtime errors. The error object also uses as the base object for the exceptions defined by the user. The complete list of JavaScript Error Object properties are listed below: Error types JavaScript RangeError â Invalid dateJavaScript RangeError â Repeat count must be no 3 min read JavaScript Error message Property In JavaScript error message property is used to set or return the error message. Syntax: errorObj.message Return Value: It returns a string, representing the details of the error. More example codes for the above property are as follows: Below is the example of the Error message property. Example 1: 1 min read HTML DOM Style columnRule Property The Style columnRule property in HTML DOM sets or returns the width, style, and color of the rule between the columns. To get the columnRule Propertyobject.style.columnRule = valueTO set the columnRule propertyobject.style.columnRule = "column-rule-width column-rule-style column-rule-color | initial 4 min read JavaScript TypeError - Can't access property "X" of "Y" This JavaScript exception can't access property occurs if property access was performed on undefined or null values. Message: TypeError: Unable to get property {x} of undefined or null reference (Edge) TypeError: can't access property {x} of {y} (Firefox) TypeError: {y} is undefined, can't access pr 1 min read JavaScript Number constructor Property JavaScript Number constructor Property is used to return the number constructor function for the object. The function which is returned by this property is just the reference to this function, not a number containing the functionâs name. The JavaScript number constructor, string constructor, and boo 1 min read Like