Returns an error message string.
Arguments
-
errorObj
-
Required. Instance of Error object.
Remarks
Example
The following example causes a TypeError exception to be thrown, and displays the name of the error and its message.
| Copy Code |
---|
try {
// 'null' is not a valid object
null.doSomething();
}
catch(e){
print(e.name + ": " + e.message);
print(e.number + ": " + e.description);
} |
Requirements
See Also