2 Replies Latest reply on Feb 2, 2011 10:01 AM by Flex harUI

    Prevent to show error window

    jfb00 Level 3

      Hi All,

      I have an application tha use methods call using coldfusion. If my method cannot connect to the database I got an error window.


      [RPC Fault faultString="coldfusion.runtime.AbortException" faultCode="Server.Processing" faultDetail="null"]
           at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:290]
           at mx.rpc::Responder/fault()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:58]
           at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]
           at NetConnectionMessageResponder/statusHandler()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:581]
           at mx.messaging::MessageResponder/status()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:222]


      I have an fault error tracking in my method and it is showing my alert ("coldfusion.runtime.AbortException") but after this big error window.

      How can I prevent for not to show this error windows?




        • 1. Re: Prevent to show error window
          Andrei Kouzmenkov Level 1

          You (or your users) shouldn't see the window when you run non-debug version of Flash Player.


          Also since FP 10.1 you can handle uncaught errors like this:


                  private function onCreationComplete(event:Event):void {
                      if (loaderInfo.hasOwnProperty("uncaughtErrorEvents")) {
                          IEventDispatcher(loaderInfo["uncaughtErrorEvents"]).addEventListener("uncaughtError", uncaughtErrorHandler);


                  private function uncaughtErrorHandler(event:Event):void {

                      // Do something about the error, like:
                      var error:Object = event["error"];
                       log.error("Uncaught Error. ErrorID={0}, Name={1} Message={2}", error.errorID, error.name, error.message);
                       event.preventDefault(); // to stop the error dialog appear in debug FP



          • 2. Re: Prevent to show error window
            Flex harUI Adobe Employee

            If the event is cancelable, call preventDefault.  Otherwise, use

            target-player=10 and use FP10.1 and the UncaughtErrorEvents.


            Remember that only those customers using debugger players like you are will

            ever see the big error window.