phonebookengines/VirtualPhonebook/VPbkSimStore/src/CContactView.cpp
branchRCL_3
changeset 6 e8e3147d53eb
parent 0 e686773b3f54
equal deleted inserted replaced
5:81f8547efd4f 6:e8e3147d53eb
   391 // CContactView::ContactAtL
   391 // CContactView::ContactAtL
   392 // --------------------------------------------------------------------------
   392 // --------------------------------------------------------------------------
   393 //
   393 //
   394 const MVPbkViewContact& CContactView::ContactAtL( TInt aIndex ) const
   394 const MVPbkViewContact& CContactView::ContactAtL( TInt aIndex ) const
   395     {
   395     {
   396     __ASSERT_ALWAYS( aIndex >= 0, 
   396     __ASSERT_ALWAYS( aIndex >= KErrNotFound, 
   397         VPbkError::Panic( VPbkError::EInvalidContactIndex ) );
   397         VPbkError::Panic( VPbkError::EInvalidContactIndex ) );
   398     if ( aIndex >= iNativeView->CountL() )
   398 
       
   399     if( aIndex == KErrNotFound)
       
   400 	    {
       
   401 		User::Leave( KErrNotFound );	
       
   402         }
       
   403     else if ( aIndex >= iNativeView->CountL() )
   399         {
   404         {
   400         User::Leave( KErrArgument );
   405         User::Leave( KErrArgument );
   401         }
   406         }
   402 
   407 
   403     iCurrentContact->SetSimContactL( iNativeView->ContactAtL( aIndex ) );
   408     iCurrentContact->SetSimContactL( iNativeView->ContactAtL( aIndex ) );