这篇教程C++ HandleError函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中HandleError函数的典型用法代码示例。如果您正苦于以下问题:C++ HandleError函数的具体用法?C++ HandleError怎么用?C++ HandleError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了HandleError函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetOptionsCLevelDBWrapper::CLevelDBWrapper(const boost::filesystem::path &path, size_t nCacheSize, bool fMemory, bool fWipe) { penv = NULL; readoptions.verify_checksums = true; iteroptions.verify_checksums = true; iteroptions.fill_cache = false; syncoptions.sync = true; options = GetOptions(nCacheSize); options.create_if_missing = true; if (fMemory) { penv = leveldb::NewMemEnv(leveldb::Env::Default()); options.env = penv; } else { if (fWipe) { LogPrintf("Wiping LevelDB in %s/n", path.string().c_str()); leveldb::DestroyDB(path.string(), options); } boost::filesystem::create_directory(path); LogPrintf("Opening LevelDB in %s/n", path.string().c_str()); } leveldb::Status status = leveldb::DB::Open(options, path.string(), &pdb); HandleError(status); LogPrintf("Opened LevelDB successfully/n");}
开发者ID:Soldy,项目名称:lincoin,代码行数:23,
示例2: MOZ_ASSERTnsresultSourceBuffer::ExpectLength(size_t aExpectedLength){ MOZ_ASSERT(aExpectedLength > 0, "Zero expected size?"); MutexAutoLock lock(mMutex); if (MOZ_UNLIKELY(mStatus)) { MOZ_ASSERT_UNREACHABLE("ExpectLength after SourceBuffer is complete"); return NS_OK; } if (MOZ_UNLIKELY(mChunks.Length() > 0)) { MOZ_ASSERT_UNREACHABLE("Duplicate or post-Append call to ExpectLength"); return NS_OK; } if (MOZ_UNLIKELY(NS_FAILED(AppendChunk(CreateChunk(aExpectedLength))))) { return HandleError(NS_ERROR_OUT_OF_MEMORY); } return NS_OK;}
开发者ID:Wafflespeanut,项目名称:gecko-dev,代码行数:23,
示例3: UE_LOGvoid FOutputDeviceWindowsError::Serialize( const TCHAR* Msg, ELogVerbosity::Type Verbosity, const class FName& Category ){ FPlatformMisc::DebugBreak(); if( !GIsCriticalError ) { const int32 LastError = ::GetLastError(); // First appError. GIsCriticalError = 1; TCHAR ErrorBuffer[1024]; ErrorBuffer[0] = 0; // Windows error. UE_LOG( LogWindows, Error, TEXT( "Windows GetLastError: %s (%i)" ), FPlatformMisc::GetSystemErrorMessage( ErrorBuffer, 1024, LastError ), LastError ); } else { UE_LOG(LogWindows, Error, TEXT("Error reentered: %s"), Msg ); } if( GIsGuarded ) { // Propagate error so structured exception handler can perform necessary work.#if PLATFORM_EXCEPTIONS_DISABLED FPlatformMisc::DebugBreak();#endif FPlatformMisc::RaiseException( 1 ); } else { // We crashed outside the guarded code (e.g. appExit). HandleError(); FPlatformMisc::RequestExit( true ); }}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:36,
示例4: sqlite3Codec// Encrypt/Decrypt functionality, called by pager.cvoid* sqlite3Codec(void *pCodec, void *data, Pgno nPageNum, int nMode){ if (pCodec == NULL) //Db not encrypted return data; switch(nMode) { case 0: // Undo a "case 7" journal file encryption case 2: // Reload a page case 3: // Load a page if (HasReadKey(pCodec)) Decrypt(pCodec, nPageNum, (unsigned char*) data); break; case 6: // Encrypt a page for the main database file if (HasWriteKey(pCodec)) data = Encrypt(pCodec, nPageNum, (unsigned char*) data, 1); break; case 7: // Encrypt a page for the journal file /* *Under normal circumstances, the readkey is the same as the writekey. However, *when the database is being rekeyed, the readkey is not the same as the writekey. *(The writekey is the "destination key" for the rekey operation and the readkey *is the key the db is currently encrypted with) *Therefore, for case 7, when the rollback is being written, always encrypt using *the database's readkey, which is guaranteed to be the same key that was used to *read and write the original data. */ if (HasReadKey(pCodec)) data = Encrypt(pCodec, nPageNum, (unsigned char*) data, 0); break; } HandleError(pCodec); return data;}
开发者ID:BenjaminSchiborr,项目名称:safe,代码行数:37,
示例5: while void TCPSocket::WriteThread() { this->mutex.lock(); while (!this->writeQueue.empty()) { BytesRef data = this->writeQueue.front(); char* buffer = data->Pointer(); size_t remaining = data->Length(); // Release lock while sending data to avoid blocking write(). this->mutex.unlock(); while (true) { try { size_t sent = this->socket.sendBytes(buffer, remaining); if (sent == remaining) break; buffer += sent; remaining -= sent; } catch (Poco::Exception& e) { HandleError(e); return; } } this->mutex.lock(); this->writeQueue.pop(); } // Notify listeners we have fully drained the queue. this->mutex.unlock(); FireEvent("drain"); }
开发者ID:Adimpression,项目名称:TideSDK,代码行数:36,
示例6: find_libdirvoidfind_libdir (void){ const char searchfile[] = "Colour.pal"; /* default_dir will be something like "C://LINCITY1.11" */ const char default_dir[] = "C://LINCITY" VERSION; /* Check 1: environment variable */ _searchenv (searchfile, "LINCITY_HOME", LIBDIR); if (*LIBDIR != '/0') { int endofpath_offset = strlen (LIBDIR) - strlen (searchfile) - 1; LIBDIR[endofpath_offset] = '/0'; return; } /* Check 2: default location */ if ((_access (default_dir, 0)) != -1) { strcpy (LIBDIR, default_dir); return; } /* Finally give up */ HandleError ("Error. Can't find LINCITY_HOME", FATAL);}
开发者ID:BackupTheBerlios,项目名称:lincity-ng-svn,代码行数:24,
示例7: HandleErrorBOOL CUdpCommClient::Push(CUdpPacketNode* pcPktNode){ if (pcPktNode->GetRawLen() >= m_ulMaxSndPktLen) { HandleError(OCFCLIENT_ERROR_USERDEF, OCFCLIENT_ERROR_USERDEF_CATEGORY_PKTMAXSIZE, 0, pcPktNode->GetRawLen(), pcPktNode->GetRawBuff()); return FALSE; } // Lock(); m_cSndPktList.Add(pcPktNode); if (TRUE == m_bConnectFlag && FALSE == m_bWouldBlock) { SetEvent(m_hWrEvent); } // Unlock(); return TRUE;}
开发者ID:BornHunter,项目名称:CGSF,代码行数:24,
示例8: printMetadataResults/*** Prints out the name value records of the matching results.*/int printMetadataResults(hc_nvr_t *nvr, hc_session_t *session){ char **names = NULL; char **values = NULL; int count = 0; hcerr_t hcError = hc_nvr_convert_to_string_arrays(nvr, &names, &values, &count); if (hcError != HCERR_OK) { HandleError(session, hcError); hc_session_free(session); return RETURN_STORAGETEK_ERROR; } /* if error occurred */ /* Print metadata record. printMetadataRecord is example specific code (in example_metadata.h) */ /* and is not part of the @[email C++ HandleEvent函数代码示例 C++ HandleCapturedNodes函数代码示例
|