Search Flex Samples

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.



Related Flex Samples

Learn Flex: Flex Samples | Flex Video Tutorials Flex Examples