Error.description
JScript5.0+Syntax
errorobj.description errorobj.description = string
Description
The description property associated with the Error object contains the description of the error. This method is read/write so you can assign descriptions using this property.
Example
Listing 9.47 creates an Error object and then displays the description.
Listing 9.47 Description of an Error
<html> <script language="JScript"> <!-- Hide //Create an Error object var myError = new Error(45,"A really big error!"); //Display description associated with the custom error document.write("The custom error description is '"); document.write(myError.description,"'"); //Hide End --> </script> </html> |
Get Pure JavaScript 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.