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
  • Object-Oriented ActionScript ActionScript is a full-featured Object-Oriented language with support for classes, interfaces, encapsulation, polymorphism, and inheritance.
  • Flex Projects Overview of the different types of projects that can be created with Flex Builder.
  • Flex Managers Flex Managers manage various aspects of a Flex application.
  • MXML Application Overview of MXML Application definition.
  • ActionScript Language Introduction to the ActionScript 3.0 programming language.