292 // |
292 // |
293 void CPbk2MultiAssignDataPhase::ContactOperationFailed |
293 void CPbk2MultiAssignDataPhase::ContactOperationFailed |
294 ( TContactOp /*aOpCode*/, TInt aErrorCode, TBool /*aErrorNotified*/ ) |
294 ( TContactOp /*aOpCode*/, TInt aErrorCode, TBool /*aErrorNotified*/ ) |
295 { |
295 { |
296 // Locking the contact failed |
296 // Locking the contact failed |
297 iObserver.PhaseError( *this, aErrorCode ); |
297 if ( KErrInUse == aErrorCode ) |
|
298 { |
|
299 CCoeEnv::Static()->HandleError( aErrorCode ); |
|
300 } |
|
301 |
|
302 // If the contact operation failed, the iStoreContact is expected to be deleted, |
|
303 // otherwise it will lead to memory leak. |
|
304 if ( iStoreContact ) |
|
305 { |
|
306 delete iStoreContact; |
|
307 iStoreContact = NULL; |
|
308 } |
|
309 |
|
310 // if iContactsProcessed > 0, the note (how many contacts had been processed) needs to be shown. |
|
311 if ( (iContactLinks->Count() > 0) || (iContactsProcessed > 0) ) |
|
312 { |
|
313 ContinueL(); |
|
314 } |
|
315 else |
|
316 { |
|
317 iObserver.PhaseError( *this, aErrorCode ); |
|
318 } |
|
319 |
298 } |
320 } |
299 |
321 |
300 // -------------------------------------------------------------------------- |
322 // -------------------------------------------------------------------------- |
301 // CPbk2MultiAssignDataPhase::VPbkSingleContactOperationComplete |
323 // CPbk2MultiAssignDataPhase::VPbkSingleContactOperationComplete |
302 // -------------------------------------------------------------------------- |
324 // -------------------------------------------------------------------------- |