Global Error Handler for Flash Player 10.1 not working

前端 未结 4 1651
萌比男神i
萌比男神i 2021-01-07 07:19

Trying to implement the new FP 10.1 Global error handler into my projects but no matter what I do any uncaught error will still show up the Exception window (both in debug a

4条回答
  •  梦毁少年i
    2021-01-07 08:04

    The docs say that:

    The UncaughtErrorEvents object that dispatches the event is associated with either a LoaderInfo object or a Loader object.

    Thus you must listen to the loaderInfo's uncaughtErrorEvents property of your topmost display object:

    loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorHandler);
    

提交回复
热议问题