本文整理汇总了C++中TRAP_IGNORE函数的典型用法代码示例。如果您正苦于以下问题:C++ TRAP_IGNORE函数的具体用法?C++ TRAP_IGNORE怎么用?C++ TRAP_IGNORE使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TRAP_IGNORE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: INFO_1
//------------------------------------------------------------------------------
// CDisplayServiceLight::PublishContext
//------------------------------------------------------------------------------
//
void CDisplayServiceLight::PublishContext( CHWRMLight::TLightStatus aStatus )
{
FUNC_LOG;
INFO_1( "Primary display light status = %d", aStatus );
if ( aStatus >= 0 &&
aStatus < KDisplayStatusTypeValueCount &&
aStatus != iCurrentStatus )
{
// Store new status
iCurrentStatus = aStatus;
// Publish context, ignore error values
TRAP_IGNORE( iContext->SetValueL(
TPtrC( KDisplayStatusTypeValues[aStatus] ) ) );
iCF.PublishContext( *iContext, iThread );
}
}
示例2: TRAP_IGNORE
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
void CIpsPlgMessagePartStorerOperation::DoCancel()
{
// <qmail>
TRequestStatus* status = &iObserverRequestStatus;
if ( status && status->Int() == KRequestPending )
{
if (&iFSOperationObserver)
{
iFSProgress.iProgressStatus = TFSProgress::EFSStatus_RequestCancelled;
iFSProgress.iError = KErrCancel;
iFSProgress.iParam = NULL;
TRAP_IGNORE( iFSOperationObserver.RequestResponseL( iFSProgress, iFSRequestId ) );
}
User::RequestComplete( status, iStatus.Int() );
}
// </qmail>
FUNC_LOG;
}
示例3: LOG
// ---------------------------------------------------------------------------
// CCmSqlMain::ConstructL
// ---------------------------------------------------------------------------
//
void CCmSqlMain::ConstructL()
{
LOG(_L("[SQL Wrapper]\t CCmSqlMain::ConstructL"));
TRAP_IGNORE( BaflUtils::EnsurePathExistsL( iFs, KCmSqlDirC ) );
iClause = CCmSqlDbClause::NewL();
iMaintenance = CCmSqlDbMaintenance::NewL();
iConnection = CCmSqlConnection::NewL();
if( iMaintenance->InitConnection(*iConnection) )
{
iMaintenance->CreateDbFile( *iConnection );
}
if( !iConnection->Validate() )
{
iMaintenance->CreateDb( *iConnection );
iMaintenance->CreateIndexes( *iConnection );
}
}
示例4: defined
/**
Utility method used to generate EContactDbObserverEventTablesOpened event
*/
void CPplContactsFile::GenerateNotificationEventL(TBool aNotify)
{
#if defined(__PROFILE_DEBUG__)
RDebug::Print(_L("[CNTMODEL] MTD: CPplContactsFile::GenerateNotificationEventL"));
#endif
// Generate an event - this event is generated if this was an explicit call from the
// server to opentables or recover database - ie A call on the contactsDatabase API
if (iDbObserver && aNotify)
{
TContactDbObserverEventV2 event;
event.iType = EContactDbObserverEventTablesOpened;
event.iContactId = 0;
event.iConnectionId = 0;
event.iTypeV2 = EContactDbObserverEventV2Null;
event.iAdditionalContactId = 0;
TRAP_IGNORE(iDbObserver->HandleDatabaseEventV2L(event));
}
}
示例5: TRAP_IGNORE
// -----------------------------------------------------------------------------
// CUpdateManager::LazyCallBack
//
//
// -----------------------------------------------------------------------------
//
TBool CUpdateManager::LazyCallBack(TAny* aPtr)
{
CUpdateManager* ptr = (CUpdateManager*)aPtr;
for(TInt i = 0; i < 10; i++)
{
if(ptr->iCurrentFeedCount< ptr->iFeedIds.Count())
{
TRAP_IGNORE(ptr->AddFeedL(ptr->iFeedIds[ptr->iCurrentFeedCount++]));
}
else
{
ptr->iCurrentFeedCount = 0;
ptr->iFeedIds.Reset();
ptr->StartTimer();
return EFalse;
}
}
return ETrue;
}
示例6: TRAP_IGNORE
void HistoryEntry::storeThumbnail(const CFbsBitmap* thumbnail, const TRect& area)
{
delete m_thumbnail;
m_thumbnail = 0;
if (!m_thumbnailBuf) {
TRAP_IGNORE(m_thumbnailBuf = CBufFlat::NewL(4096));
}
if (m_thumbnailBuf) {
RBufWriteStream stream(*m_thumbnailBuf);
CleanupClosePushL(stream);
TRAPD(err, thumbnail->ExternalizeRectangleL(stream, area));
stream.Close();
CleanupStack::PopAndDestroy(); //stream
if (err) {
delete m_thumbnailBuf;
m_thumbnailBuf = 0;
}
}
}
示例7: TRAP_IGNORE
// ---------------------------------------------------------------------------
// CFepUiLayoutRootCtrl::OnDeActivate
// Response to layout de activation event
// (other items were commented in a header).
// ---------------------------------------------------------------------------
//
EXPORT_C void CFepUiLayoutRootCtrl::OnDeActivate()
{
if ( iPointerCaptureCtrl )
{
if(iPointerCaptureCtrl->PointerDown())
{
TRAP_IGNORE(iPointerCaptureCtrl->CancelPointerDownL());
}
//CFepLayoutMultiLineIcf::CancelPointerDownL may set iPointerCaptureCtrl to be NULL
if ( iPointerCaptureCtrl )
{
iPointerCaptureCtrl->CapturePointer(EFalse);
iPointerCaptureCtrl = NULL;
}
}
iPointerDownCanceled = EFalse;
CControlGroup::OnDeActivate();
}
示例8: TRAP_IGNORE
/**
Close the database.
*/
void CPplContactsFile::Close(TBool aNotify)
{
// Close the resource which depends on iDatabase before it will be closed.
for (TInt i = 0; i < iSqlDatabaseObservers.Count(); i++ )
{
iSqlDatabaseObservers[i]->OnCloseL();
}
iDatabase.Close();
iFileIsOpen = EFalse;
REComSession::FinalClose(); // This line is necessary to make sure the plug-in is unloaded properly
iLocalFs.Close(); //we now use a local File Session
iIccContactStore.Close();
TRAP_IGNORE(CloseTablesL(aNotify) ); // CloseTablesL() cannot leave anyway but still
// trap in case implementation changes later
}
示例9: DEBUGPRINT2
/**
Loads and sets up the custom command dll
*/
void CCmdCustomCommand::PrepareCustomCmdL()
{
TInt err = KErrNone;
if (!iLoaded)
{
// load the dll
DEBUGPRINT2(_L("Loading library %S..."), &iInfo->FileName());
err = iLibrary.Load(iInfo->FileName());
if (err == KErrNone)
{
iLoaded = ETrue;
if(iInfo->Unloading() == ENeverUnload)
{
//Record the handle into the file.
//If it fails to write the handle, ignore it.
//We don't want to stop the processing of the command due to this failure.
TRAP_IGNORE(WriteHandleToFileL(iLibrary.Handle()));
}
}
}
if (iLoaded)
{
err = KErrNotFound;
// get a pointer to the function
DEBUGPRINT2A("Looking up ordinal %d...", iInfo->Ordinal());
TLibraryFunction function = iLibrary.Lookup(iInfo->Ordinal());
if (function)
{
// cast the pointer to our custom cmd type
CustomCmdFunctionType customCmdFunction = reinterpret_cast<CustomCmdFunctionType>(function);
iCustomCommand = (*customCmdFunction)();
if (iCustomCommand)
{
err = KErrNone;
}
}
}
MoveToNextStateL(err, EInitialiseDll);
}
示例10: TRAP_IGNORE
void CImMobilityLogger::LogFormat(TInt /*aFilePos*/, VA_LIST& /*aList*/, TRefByValue<const TDesC8> /*aFmt*/)
#endif //__IM_MOBILITY_LOGGING
{
#ifdef __IM_MOBILITY_LOGGING
if (iFileList.Count() == 0)
{
return;
}
if (aFilePos >= iFileList.Count())
{
aFilePos = KDefaultLog;
}
if ((aFilePos == KDefaultLog) && (iDefaultLogFileInUse == EFalse))
{
return;
}
if (!iFileList[aFilePos].iLoggingOn)
{
return;
}
iFile = &iFileList[aFilePos].iFile;
TPtr8 buf = iLogBuffer->Des();
buf.Zero();
TTime date;
date.UniversalTime();
TBuf<KDateFormatLength> dateString;
TRAP_IGNORE(date.FormatL(dateString, KTxtLogDateFormat));
buf.Copy(dateString);
buf.AppendFormatList(aFmt, aList, this);
iFile->Write(buf);
iFile->Write(KTxtCRLF());
#endif //__IM_MOBILITY_LOGGING
}
示例11: GetCurAppUid
void CPenUiBackgroundWnd::Show(const TRect& aExtend, TBool aGlobalNotes,
TBool aInternal, TInt aPriority, TBool aResource)
{
//Show the window will cause a focus group change in global notes showing case.
if (!iBitmap)
{
return;
}
TUid curApp = GetCurAppUid();
TUid focusApp = GetFocusAppUid();
//dim effect due to global notes will not done by background control
if(!aInternal || aGlobalNotes)
return;
// if (iBitmapCpoy)
{
// delete iBitmapCpoy;
// iBitmapCpoy = NULL;
}
SetRect(aExtend);
TRAP_IGNORE(ActivateL());
MakeVisible(ETrue);
if (!aResource)
{
RWsSession &ws = CCoeEnv::Static()->WsSession();
TInt wgId =ws.GetFocusWindowGroup();
TInt priority = ws.GetWindowGroupOrdinalPriority(wgId);
iWndGroup.SetOrdinalPosition( 0, aPriority);
Window().SetOrdinalPosition(0,aPriority);
Window().SetFaded(ETrue,RWindowTreeNode::EFadeWindowOnly);
}
else
{
Window().SetFaded(ETrue,RWindowTreeNode::EFadeWindowOnly);
}
Window().Invalidate();
DrawNow();
}
示例12: OstTraceFunctionEntry0
void CMsmmServer::DismountUsbDrivesL(TUSBMSDeviceDescription& aDevice)
{
OstTraceFunctionEntry0( CMSMMSERVER_DISMOUNTUSBDRIVERSL_ENTRY );
delete iDismountManager;
iDismountManager = NULL;
iDismountManager= CMsmmDismountUsbDrives::NewL();
//Also notify the MSMM plugin of beginning of dismounting
iDismountErrData->iError = EHostMsEjectInProgress;
iDismountErrData->iE32Error = KErrNone;
iDismountErrData->iManufacturerString = aDevice.iManufacturerString;
iDismountErrData->iProductString = aDevice.iProductString;
iDismountErrData->iDriveName = 0x0;
TRAP_IGNORE(iPolicyPlugin->SendErrorNotificationL(*iDismountErrData));
// Start dismounting
iDismountManager->DismountUsbDrives(*iPolicyPlugin, aDevice);
OstTraceFunctionExit0( CMSMMSERVER_DISMOUNTUSBDRIVERSL_EXIT );
}
示例13: Cancel
//
// ~CMsgImOutboxSend -- destructor.
//
CMsgImOutboxSend::~CMsgImOutboxSend( )
{
Cancel();
TRAP_IGNORE(CleanUpOnDestructL());
delete iSession; //should be dead
delete iSettings;
if (iBccRcptArray)
{
iBccRcptArray->Reset();
delete iBccRcptArray;
}
#if (defined SYMBIAN_USER_PROMPT_SERVICE)
delete iWaiter;
#endif
delete iMobilityManager;
delete iSessionManager;
}
示例14: NOTIF_NOTHANDLED
// ---------------------------------------------------------------------------
// From class MBTEngSettingsObserver.
// Handle a visibility mode change.
// ---------------------------------------------------------------------------
//
void CBTNotifSettingsTracker::VisibilityModeChanged( TBTVisibilityMode aState )
{
if( iVisibilityMode == EBTVisibilityModeTemporary &&
aState == EBTVisibilityModeHidden && iPowerState == EBTPowerOn )
{
// Timeout expired, launch a note.
// Note that we get the power state change before this one, when powering
// off and setting visibility mode to hidden automatically.
NOTIF_NOTHANDLED( !iNotification )
iNotification = iServer->NotificationManager()->GetNotification();
if ( iNotification )
{
iNotification->SetObserver( this );
iNotification->SetNotificationType( TBluetoothDeviceDialog::ENote, EVisibilityTimeout );
TRAP_IGNORE(
iServer->NotificationManager()->QueueNotificationL( iNotification ) );
}
}
iVisibilityMode = aState;
}
示例15: TRAP_IGNORE
void TTcSettings::Store()
{
// Connect to file server
RFs fs;
if( fs.Connect() )
{
return;
}
// Open the settings file for writing, replace any existing data
RFileWriteStream out;
if( !out.Replace( fs, KTcSettingsFile, EFileWrite ) )
{
// Write actual data, ignore errors
TRAP_IGNORE( doStoreL( out ) )
}
out.Close();
fs.Close();
}