Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns or sets the descriptive string associated with a specific error.
object.description [= stringExpression]
Arguments
- object
Required. Any instance of an Error object.
- stringExpression
Optional. A string expression containing a description of the error.
Remarks
The description property contains the error message string associated with a specific error. Use the value contained in this property to alert a user to an error that you can't or don't want to handle.
The following example illustrates the use of the description property:
try
x = y // Cause an error.
catch(var e){ // Create local variable e.
document.write(e) // Prints "[object Error]".
document.write((e.number & 0xFFFF)) // Prints 5009.
document.write(e.description) // Prints "'y' is undefined".
}
Requirements
Applies To: Error Object (JScript 5.6)
See Also
Reference
number Property (JScript 5.6)
message Property (JScript 5.6)
name Property (JScript 5.6)