This documentation is archived and is not being maintained.

description Property

Updated: July 2009

Returns or sets the descriptive string associated with a specific error.



Required. An instance of an Error object.

The description property is a string containing an error message associated with a specific error. Use the value contained in this property to alert a user to an error.

The description and message properties provide the same functionality; the description property provides backward compatibility, while the message property complies with the ECMA standard.

The following example illustrates the use of the description property.

    var arr = new Array(-1);
    print ("Error Message: " + e.message);
    print ("Error Description: " + e.description);
    print ("Error Code: " + (e.number & 0xFFFF))
    print ("Error Name: " +;

The output of this code is as follows.

Error Message: Array length must be zero or a positive integer
Error Description: Array length must be zero or a positive integer
Error Code: 5029
Error Name: RangeError




July 2009

Modified example.

Content bug fix.

March 2009

Modified example and remarks.

Information enhancement.