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

Method SoftFail

IDEHelper/Backend/BeMCContext.cpp:1953–1969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1951}
1952
1953void BeMCContext::SoftFail(const StringImpl& str, BeDbgLoc* dbgLoc)
1954{
1955 if (mFailed)
1956 return;
1957 mFailed = true;
1958
1959 String errStr = StrFormat("Failure during codegen of %s: %s", mBeFunction->mName.c_str(), str.c_str());
1960
1961 if (dbgLoc != NULL)
1962 {
1963 auto dbgFile = dbgLoc->GetDbgFile();
1964 if (dbgFile != NULL)
1965 errStr += StrFormat(" at line %d:%d in %s/%s", dbgLoc->mLine + 1, dbgLoc->mColumn + 1, dbgFile->mDirectory.c_str(), dbgFile->mFileName.c_str());
1966 }
1967
1968 mModule->mBeIRCodeGen->Fail(errStr);
1969}
1970
1971String BeMCContext::ToString(const BeMCOperand& operand)
1972{

Callers

nothing calls this directly

Calls 3

GetDbgFileMethod · 0.80
c_strMethod · 0.45
FailMethod · 0.45

Tested by

no test coverage detected