Name
Error.toString( ) — convert an Error object to a string
Availability
JavaScript 1.5; JScript 5.5; ECMAScript v3
Inherits from/Overrides
Overrides Object.toString( )
Synopsis
error
.toString( )
Returns
An implementation-defined string. The ECMAScript standard does not specify anything about the return value of this method, except that it is a string. Notably, it does not require the returned string to contain the error name or the error message.
Get JavaScript: The Definitive Guide, Fourth 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.