JavaScript Error.prototype.fileName Property Last Updated : 10 Feb, 2023 Comments Improve Suggest changes Like Article Like Report 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 property is one of the parameters, which is passed during creating an error object. Syntax: errorObj.fileName Property value: Path of the file containing code that raised this error. Return Value: It returns a string, representing the path of the file containing code that raised this error. Example 1: JavaScript <script> try { var err = new Error ("Could not parse file"); if(err.fileName == undefined) err.fileName = "/Users/abhinavjain194/desktop/GFG/err.js" throw err; } catch(e) { console.log ("Error: " + e.message); console.log ("The Error occurred at " + e.fileName); } </script> Output: Error: Could not parse file The Error occurred at /Users/abhinavjain194/desktop/GFG/err.js Example 2: JavaScript <script> try { var err = new Error ("Unexpected token output"); if(err.fileName == undefined) err.fileName = "/Users/abhinavjain194/desktop/GFG/token_err.js" throw err; } catch(e) { console.log ("Error: " + e.message); console.log ("The Error occurred at " + e.fileName); } </script> Output: Error: Unexpected token output The Error occurred at /Users/abhinavjain194/desktop/GFG/token_err.js Supported Browsers: Google ChromeFirefoxSafariOperaInternet Explorer 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.fileName 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.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.prototype.columnNumber property 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 th 2 min read JavaScript WebAPI File.type Property The File.type property is an inbuilt function of File WebAPI which gives the media type (MIME) of the file represented by a file object. Syntax:let name = file.type;Return Value: It returns a string containing media type (MIME) indicating the type of the file. For example: "image/png" for PNG images 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 Like