1 Reply Latest reply on Jun 15, 2010 11:46 PM by Flex harUI

    How to handle loaded child sub application errors in parent application

    fatima.m

      Hi,

       

      I have a main application that has a menu bar. When the user clicks on an item on the menu bar, a SWFLoader  loads the menu bar item's URL as a child sub appliation. Unfortunately, when the loaded sub application throws an exception (as the user interacts with it), and the user clicks on a different menu item, nothing else gets loaded through the SWFLoader. In fact, the Menubar itself has an unexpected behavior.

       

      The child subapplication is throwing this error:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.

       

      How can I prevent the main application from being affected by errors in its children applications?

       

      Thank you for your advise. I really appreciate it.

        • 1. Re: How to handle loaded child sub application errors in parent application
          Flex harUI Adobe Employee

          I would expect there to be a stacktrace following the error that might

          contain useful information.

           

          I'm not sure why the SWFLoader won't load something else.  Maybe the stack

          trace will have a clue.  It may also tell you how to absorb that error.

           

          If you use FP 10.1, you can use the Global Exception Handler to absorb the

          error.  Keep in mind that 90% of your users normally use the production

          Flash Player which does not stop and show these errors so if you set up your

          code properly, it will continue on successfully.