Flex httpservice 故障
我得到了一个使用 RESTFUL 服务的 Flex 应用程序。
我已经成功创建了一个 SQLite 数据库来存储来自服务的数据,现在我希望应用程序能够离线运行并利用本地数据库中存在的数据。这工作得很好,唯一的问题是 httpService 对象在无法连接时会抛出错误。
如果我没有提供处理故障事件的方法,那么它会显示在错误窗口中。 如果我提供一个空白方法来处理故障,那么它仍然显示在错误窗口中。
如何让它停止显示此错误窗口?
问候, 克雷格
I've been given a Flex application which made use of a RESTFUL service.
I've managed to create a SQLite DB which stored data from the service and now I would like the application to be able to run offline and make use of the data existing in it's local DB. This works fine the only problem is that the httpService object throws a fault when it cannot connect.
If I don't provide a method to handle the fault event then it is displayed in an error window.
If I provide a blank method to handle the fault then it is still displayed in an error window.
How can I get it to stop displaying this error Window?
Regards,
Craig
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在发出 httpservice 请求之前检查网络连接。
Flex 3 - Adobe Flex 3 帮助 - 网络连接
这样,当异常发生时,它实际上是一种意外行为,而不是常规程序使用的情况。
Check for a network connection before making the httpservice request.
Flex 3 - Adobe Flex 3 Help - Network Connectivity
That way, when an exception occurs it's really an unexpected behavior instead of something that could be regular program usage.
没关系...问题是其他东西正在产生同样的故障...
Never Mind... Problem was that something else was generating the same fault...