MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 287

Actionscript language reference
Table of Contents

Advertisement

Error class
Availability
Flash Player 7.
Description
Contains information about an error that occurred in a script. You create an Error object using
the
constructor function. Typically, you throw a new Error object from within a
Error
block that is then caught by a
You can also create a subclass of the Error class and throw instances of that subclass.
Method summary for the Error class
Method
Error.toString()
Property summary for the Error class
Property
Error.message
Error.name
Constructor for the Error class
Availability
Flash Player 7.
Usage
new Error([message:String]) : Error
Parameters
A string associated with the Error object; this parameter is optional.
message
Returns
A reference to an Error object.
Description
Constructor; creates a new Error object. If
Error.message
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) {
or
catch
Description
Returns the string representation of an Error object.
Description
A string that contains an error message associated with an error.
A string that contains the name of the Error object.
property.
ActionScript Core Classes
code block.
finally
is specified, its value is assigned to the object's
message
CHAPTER 6
code
try
Error class
287

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents