User Guide

276 Handling Errors
MemoryError A MemoryError exception is
thrown when a memory
allocation request fails.
By default, ActionScript Virtual
Machine 2 does not impose a limit
on how much memory an
ActionScript program may allocate.
On a desktop PC, memory
allocation failures are infrequent.
You see an error thrown when the
system is unable to allocate the
memory required for an operation.
So, on a desktop PC, this exception
is rare unless an allocation request
is extremely large; for example, a
request for 3 billion bytes is
impossible because a 32-bit
Windows program can access only
2 GB of address space.
ScriptTimeoutError A ScriptTimeoutError exception
is thrown when a script timeout
interval of 15 seconds is reached.
By catching a
ScriptTimeoutError exception,
you can handle the script timeout
more gracefully. If there is no
exception handler, the uncaught
exception handler will display a
dialog box with an error
message.
To prevent a malicious developer
from catching the exception and
staying in an infinite loop, only the
first ScriptTimeoutError exception
thrown in the course of a particular
script can be caught. A subsequent
ScriptTimeoutError exception
cannot be caught by your code and
will immediately go to the uncaught
exception handler.
StackOverflowError The StackOverflowError
exception is thrown when the
stack available to the script has
been exhausted.
A StackOverflowError exception
might indicate that infinite recursion
has occurred.
Class name Description Notes