Adobe Flex 3 Help

ActionScript core Error classes

In addition to the core ECMAScript Error classes, ActionScript adds several classes of its own for ActionScript-specific error conditions and error-handling functionality.

Because these classes are ActionScript language extensions to ECMAScript edition 4 draft language specification that could potentially be interesting additions to the draft specification, they are kept at the top level instead of being placed in a package like flash.error.

Class name

Description

Notes

ArgumentError

The ArgumentError class represents an error that occurs when the parameter values supplied during a function call do not match the parameters defined for that function.

Some examples of argument errors include the following:

  • Too few or too many arguments are supplied to a method.
  • An argument was expected to be a member of an enumeration and was not.

SecurityError

The SecurityError exception is thrown when a security violation takes place and access is denied.

Some examples of security errors include the following:

  • An unauthorized property access or method call is made across a security sandbox boundary.
  • An attempt was made to access a URL not permitted by the security sandbox.
  • A socket connection was attempted to an unauthorized port number--for example, a port below 1024--without a policy file present.
  • An attempt was made to access the user's camera or microphone, and the request to access the device was denied by the user.

VerifyError

A VerifyError exception is thrown when a malformed or corrupted SWF file is encountered.

When a SWF file loads another SWF file, the parent SWF can catch a VerifyError generated by the loaded SWF.