0

我在 Flex AIR 应用程序中收到此错误:

TypeError: Error #1034: Type Coercion failed: cannot convert org.httpclient.events::HttpErrorEvent@daf35f1 to flash.events.IOErrorEvent.
at org.httpclient.events::HttpListener/onInternalError()[/Users/gabe/Projects/as3httpclient/src/org/httpclient/events/HttpListener.as:96]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.httpclient::HttpSocket/onTimeout()[/Users/gabe/Projects/as3httpclient/src/org/httpclient/HttpSocket.as:299]
at org.httpclient::HttpTimer/onTimer()[/Users/gabe/Projects/as3httpclient/src/org/httpclient/HttpTimer.as:50]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

我成功地使用了 as3httpclient 库,但是在我实现了一个从我的应用程序中捕获所有错误事件的代码之后,我注意到这个奇怪的错误被捕获了。

在这个堆栈跟踪中根本没有引用我自己的代码,所以我找不到错误所在的位置。

你认为这个错误是这个 as3httpclient 库中的错误吗?

我该如何使用这个

HttpErrorEvent@daf35f1 

在调试此错误时?

更多信息:此错误仅在启动我的应用程序后 1 分钟后出现一次。

4

2 回答 2

0

你在处理程序中使用匿名函数吗?这可能会引发奇怪的错误。

如果没有,那么当您收到错误时,请单击调试器中的堆栈以找出正在处理它的函数。

于 2013-10-15T03:48:46.967 回答
0

尝试调用事件处理程序时发生错误;所以你不会在处理程序方法中看到任何痕迹。

一种调试方法是将每个处理程序的参数更改为 Event 而不是 IOEvent。那应该消除错误。然后你可以将每个方法一个一个改回 IOEvent ,重新运行代码来确定实际错误在哪里。

于 2013-11-11T23:29:18.867 回答