Follow Flex After Dark on Twitter

ActionScript Exceptions and Handling

Throwing Exceptions

Handling Exceptions

ActionScript uses try/catch/finally for exception handling.

ActionScript exception handling using try/catch/finally:

   // functions do not declare that they throw
   public function doSomething():void
   {
      try
      {
         // try something
      }
      catch( error:Error )
      {
         // handle error by rethrowing
         throw error;
      }
      finally
      {
         // reached whether or not there's an exception
      }
   }

Common Exceptions and Codes

Related Links:

Related Docs
Recent Docs
Random Docs
  • Flex Text Controls Flex Text Controls allow the display and input of simple and rich HTML text.
  • Flex Fonts Working with Fonts in Flex, including embedding and runtime loading.
  • Flex HTML Template Flex projects in Flex Builder make use of an HTML Template file for launching.
  • Flex Collection Sorting Sorting Collections with the Sort and SortField objects.
  • Flex StyleSheets StyleSheets define styles for Flex components and can be defined inline or loaded at run-time.