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

Method InternalError

IDEHelper/Compiler/BfModule.cpp:3656–3682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3654}
3655
3656void BfModule::InternalError(const StringImpl& error, BfAstNode* refNode, const char* file, int line)
3657{
3658 static bool isInside = false;
3659 if (isInside)
3660 return;
3661
3662 isInside = true;
3663
3664 String fullError = error;
3665
3666 if (file != NULL)
3667 fullError += StrFormat(" at %s:%d", file, line);
3668
3669 fullError += StrFormat("\nModule: %s", mModuleName.c_str());
3670
3671 if (mCurTypeInstance != NULL)
3672 fullError += StrFormat("\nType: %s", TypeToString(mCurTypeInstance).c_str());
3673 if (mCurMethodInstance != NULL)
3674 fullError += StrFormat("\nMethod: %s", MethodToString(mCurMethodInstance).c_str());
3675
3676 if ((mCurFilePosition.mFileInstance != NULL) && (mCurFilePosition.mFileInstance->mParser != NULL))
3677 fullError += StrFormat("\nSource Location: %s:%d", mCurFilePosition.mFileInstance->mParser->mFileName.c_str(), mCurFilePosition.mCurLine + 1);
3678
3679 Fail(String("INTERNAL ERROR: ") + fullError, refNode);
3680
3681 isInside = false;
3682}
3683
3684void BfModule::NotImpl(BfAstNode* astNode)
3685{

Callers 4

TryDevirtualizeCallMethod · 0.80
LoadFieldMethod · 0.80
CreateCallMethod · 0.80
MatchMethodMethod · 0.80

Calls 4

TypeToStringFunction · 0.85
FailFunction · 0.85
StringClass · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected