MCPcopy Create free account
hub / github.com/beefytech/Beef / ProcessErrors

Method ProcessErrors

IDEHelper/Compiler/BfCodeGen.cpp:943–974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

941}
942
943void BfCodeGen::ProcessErrors(BfPassInstance* passInstance, bool canceled)
944{
945 for (auto& errorEntry : mFailedRequests)
946 {
947 if (!errorEntry.mErrorMessages.IsEmpty())
948 {
949 for (auto const & errorMsg : errorEntry.mErrorMessages)
950 passInstance->Fail(StrFormat("Module '%s' failed during codegen with: %s", errorEntry.mSrcModule->mModuleName.c_str(), errorMsg.c_str()));
951 }
952 else if (!canceled)
953 passInstance->Fail(StrFormat("Failed to create %s", errorEntry.mOutFileName.c_str()));
954 // mHadBuildError forces it to build again
955 errorEntry.mSrcModule->mHadBuildError = true;
956 }
957
958 mFailedRequests.Clear();
959
960 bool showedCacheError = false;
961 for (auto& dirEntryPair : mDirectoryCache)
962 {
963 auto dirEntry = dirEntryPair.mValue;
964 if (!dirEntry->mError.empty())
965 {
966 if (!showedCacheError)
967 {
968 passInstance->Fail(dirEntry->mError);
969 showedCacheError = true;
970 }
971 dirEntry->mError.clear();
972 }
973 }
974}
975
976BfCodeGenDirectoryData * BfCodeGen::GetDirCache(const StringImpl & cacheDir)
977{

Callers 1

DoCompileMethod · 0.80

Calls 6

IsEmptyMethod · 0.45
FailMethod · 0.45
c_strMethod · 0.45
ClearMethod · 0.45
emptyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected