Javascript Reference
Categories: Error

javascript Error name

@March 15, 2008, 1:22 a.m.
nameFirefox/Netscape/NN 6 IE 5.5(Win) ECMA 3  

Read/Write  

This is a string that sometimes indicates the type of the current error. The default value of this property is Error. But the browser may also report types EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError, and, if supported by the browser, a specific W3C DOM error type.

 
Example
 
if (myError.name == "SyntaxError") {
    // handle syntax error
}
 
Value

String.


Powered by Linode.