The flash.error package contains Error classes that are considered part of the Flash Player API. In contrast to the Error classes just described, the flash.error package communicates errors events that are specific to Flash Player or Adobe AIR.
|
Class name |
Description |
Notes |
|---|---|---|
|
EOFError |
An EOFError exception is thrown when you attempt to read past the end of the available data. |
For example, an EOFError is thrown when one of the read methods in the IDataInput interface is called and there is insufficient data to satisfy the read request. |
|
IllegalOperationError |
An IllegalOperationError exception is thrown when a method is not implemented or the implementation doesn't cover the current usage. |
Examples of illegal operation error exceptions include the following:
|
|
IOError |
An IOError exception is thrown when some type of I/O exception occurs. |
You get this error, for example, when a read-write operation is attempted on a socket that is not connected or that has become disconnected. |
|
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 Microsoft® 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. |