equal
deleted
inserted
replaced
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 ) ); |