Error.tostring() - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Error.toString()

Availability
Flash Player 7.
Usage
my_err.toString() : String
Returns
A string.
Description
Method; returns the string
if defined.
Example
In the following example, a function throws an error (with a specified message) if the two strings
that are passed to it are not identical:
function compareStrings(str1_str:String, str2_str:String):Void {
if (str1_str != str2_str) {
throw new Error("Strings to not match.");
}
}
try {
compareStrings("Dog", "dog");
// output: Strings to not match.
} catch (e_err:Error) {
trace(e_err.toString());
}
See also
Error.message,
throw
by default or the value contained in
"Error"
,
try..catch..finally
,
Error.message
Error.toString()
293

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents