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 Validators Flex Validators are used for validating user-input data.
  • Flex Item Renderers A Flex Item Renderer is a component used by data-driven controls, including lists, for displaying each item of a data provider.
  • ActionScript ArrayCollection The ArrayCollection class is a robust collection class that can be more useful than a standard array.
  • Flex List Controls Flex List controls refer to a special group of controls that display collections of items, usually from a data provider.
  • Flex Text Controls Flex Text Controls allow the display and input of simple and rich HTML text.