2 Replies Latest reply on May 14, 2008 6:15 PM by ntsiii

    Trapping errors

    KenJohnson
      Is there a way to implement a global error trap at the application level?

      I added an event listener on my application tag, but it doesn't trap the error and it doesn't prevent the action script error dialog from showing.

      My application loads multiple modules and I would like to trap and manage all errors in my application, preferably at one location. Is this possible?

      Thanks for your help!
        • 1. Re: Trapping errors
          batmitra Level 1
          hi
          there are several ways to trap errors with flex, try these:

          - Use the log to save and see errors
          -Use the onfault event that exists in almost everything in flex
          -Use try catch to trap errors.

          • 2. Re: Trapping errors
            ntsiii Level 3
            This is a common request, but there is not really a satisfactory solution.

            You must trap any errors yourself, as batmitra said, using try...catch and fault handlers.

            Also, know that if the user is not using a debug flash player, then the error will not be displayed. The app will not stop.

            Tracy