When I run a Flex application in the debug flash player I get an exception pop up as soon as something unexpected happened. However when a customer uses the application he d
I attached the event listener to the 'root', which worked for me:
sprite.root.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onUncaughtError);
In the debug Flash Player this will still error, but in the non-debug version the error will appear in Flash Player's dialog box - and then the handler will respond. To stop the dialog box from appearing, add:
event.preventDefault();
so:
private function onUncaughtError(event:UncaughtErrorEvent):void
{
event.preventDefault();
// do something with this error
}
I was using this in AIR, but I assume it works for standard AS3 projects too.