| 10747 | } |
| 10748 | |
| 10749 | BfError* CeMachine::FailCurrent(BfModule* srcModule, const StringImpl& error, BfAstNode* refNode) |
| 10750 | { |
| 10751 | BfError* bfError = NULL; |
| 10752 | |
| 10753 | if ((mCurBuilder != NULL) && |
| 10754 | ((mCurContext != NULL) || (mCurBuilder->mRecursiveDepth > mCurContext->mRecursiveDepth))) |
| 10755 | { |
| 10756 | String useError = error; |
| 10757 | useError += StrFormat(" during const-eval generation of '%s'", srcModule->MethodToString(mCurBuilder->mCeFunction->mMethodInstance).c_str()); |
| 10758 | bfError = srcModule->Fail(error, refNode); |
| 10759 | |
| 10760 | if (bfError != NULL) |
| 10761 | { |
| 10762 | auto filePos = mCurBuilder->mCeMachine->mCeModule->mCurFilePosition; |
| 10763 | auto parser = filePos.mFileInstance->mParser; |
| 10764 | if (parser != NULL) |
| 10765 | { |
| 10766 | srcModule->mCompiler->mPassInstance->MoreInfoAt( |
| 10767 | StrFormat("See comptime method '%s' processing location", srcModule->MethodToString(mCurBuilder->mCeFunction->mMethodInstance).c_str()), |
| 10768 | parser, filePos.mCurSrcPos, 1, BfFailFlag_None); |
| 10769 | } |
| 10770 | } |
| 10771 | } |
| 10772 | else |
| 10773 | { |
| 10774 | bfError = srcModule->Fail(error, refNode); |
| 10775 | } |
| 10776 | return bfError; |
| 10777 | } |
| 10778 | |
| 10779 | void CeMachine::FailCurrentMoreInfo(const StringImpl& error, BfAstNode* refNode) |
| 10780 | { |
no test coverage detected