捕获 Flash URLLoader 错误
我正在尝试对 URLLoader 进行防弹攻击,并想知道我需要在哪里捕获 404 等事件,更重要的是,会话中超时和连接失败。
该应用程序将在连接不稳定的地方运行,并且连接很可能会正确启动,但会在中间的某个地方终止。我无法在测试中重现这些场景,希望有人能给我指出错误处理的完整列表,以便我可以预测大多数常见的网络故障并进行处理。
TIA。
I'm trying to bullet proof a URLLoader and wondering where I need to capture things like 404s and more importantly, mid-session timeouts and connectivity failures.
The app will be run in places where the connectivity is spotty and it is very possible that a connection will initiate correctly, but will die somewhere in the middle. I'm unable to recreate these scenarios in testing and am hoping someone can point me to a comprehensive list of error handling, so that I can anticipate most of the common network failures and handle them.
TIA.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需处理 ioError 和 securityError 事件 - 这将捕获所有错误。超时最终只会产生 ioError。
您可能还想监听
httpStatus
事件以获取 HTTP 代码。You only need to handle the
ioError
andsecurityError
events - that will catch all the errors. Timeouts will just eventually produce an ioError.You might also want to listen to the
httpStatus
event to get the HTTP code.