Name
Error.name: the type of an error â ECMAScript v3
Synopsis
error
.name
Description
The name
property of an
Error object (or of an instance of any subclass of Error) specifies
the type of error or exception that occurred. All Error objects
inherit this property from their constructor. The value of the
property is the same as the name of the constructor. Thus
SyntaxError objects have a name
property of âSyntaxErrorâ, and EvalError objects have a name
of âEvalErrorâ.
Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.