Share via


message Property (JScript 5.6) 

Returns an error message string.


errorObj.message

Arguments

  • errorObj
    Required. Instance of Error object.

Remarks

The message property is a string containing an error message displayed to users. It contains the same information as the description property.

Example

The following example causes a TypeError exception to be thrown, and displays the name of the error and its message.

try {

  // 'null' is not a valid object

  null.doSomething();

}

catch(e){

  print(e.name + ": " + e.message);

  print(e.number + ": " + e.description);

}

Requirements

Version 5

Applies To: Error Object (JScript 5.6)

See Also

Reference

description Property (JScript 5.6)
name Property (JScript 5.6)