Error handling in ActionScript 3.0

Since many applications can run without building the logic to handle errors, developers are tempted to postpone building error handling into their applications. However, without error handling, an application may easily stall or frustrate the user if something doesn't work as expected. ActionScript 2.0 has an Error class that allows you to build logic into custom functions to throw an exception with a specific message. Because error handling is critical for making a user-friendly application, ActionScript 3.0 includes an expanded architecture for catching errors.

NOTE

 

While the ActionScript 3.0 Language and Components Reference documents the exceptions thrown by many methods, it may not include all possible exceptions for each method. A method may throw an exception for syntax errors or other problems that are not noted explicitly in the method description, even when the description does list some of the exceptions a method throws.

Subtopics

ActionScript 3.0 error-handling elements
Error-handling strategies

Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00000098.html