如何捕获此错误?

时间:2013-12-18 11:23:43

标签: flex try-catch dataservice

我有问题。从数据服务我收到具有相同标识的行,并且运行我的应用程序时出现此错误:

Error: Collection result contains a duplicate item: SalesPro.Duplicates:#:1 exists at both position: 0 and 1
          at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processSequence()[C:\depot\DataServices\branches\milestone\adepds46_rc\frameworks\pro jects\data\src\mx\data\DataList.as:2697]
          at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processSequenceResult()[C:\depot\DataServices\branches\milestone\adepds46_rc\frameworks\pro jects\data\src\mx\data\DataList.as:2948]
          at mx.data::DataListRequestResponder/result()[C:\depot\DataServices\bran ches\milestone\adepds46_rc\frameworks\projects\data\src\mx\data\DataLi stRequestResponder.as:102]
          at mx.rpc::AsyncRequest/acknowledge()[/Users/justinmclean/Documents/Apac heFlex4.10/frameworks/projects/rpc/src/mx/rpc/AsyncRequest.as:92]
          at NetConnectionMessageResponder/resultHandler()[/Users/justinmclean/Doc uments/ApacheFlex4.10/frameworks/projects/rpc/src/mx/messaging/channel s/NetConnectionChannel.as:560]
          at mx.messaging::MessageResponder/result()[/Users/justinmclean/Documents /ApacheFlex4.10/frameworks/projects/rpc/src/mx/messaging/MessageRespon der.as:243]

我怎样才能发现这个错误?

code:
var params:Object = {
Session_ID: SecurityManager.sessionID
};
resultArr = DataController.getData("MainView", "SalesPro.Duplicates", "all", params, false, resultHandler, faultHandler); 

在ArrayCollection中写入结果后出现此错误。在此错误之后调用Result事件处理程序。

0 个答案:

没有答案