| 3609 | } |
| 3610 | |
| 3611 | void BfModule::FatalError(const StringImpl& error, const char* file, int line, int column) |
| 3612 | { |
| 3613 | static bool sHadFatalError = false; |
| 3614 | static bool sHadReentrancy = false; |
| 3615 | |
| 3616 | if (sHadFatalError) |
| 3617 | { |
| 3618 | return; |
| 3619 | sHadReentrancy = true; |
| 3620 | } |
| 3621 | sHadFatalError = true; |
| 3622 | |
| 3623 | String fullError = error; |
| 3624 | |
| 3625 | if (file != NULL) |
| 3626 | { |
| 3627 | fullError += StrFormat(" at %s:%d", file, line); |
| 3628 | if (column != -1) |
| 3629 | fullError += StrFormat(":%d", column); |
| 3630 | } |
| 3631 | |
| 3632 | fullError += StrFormat("\nModule: %s", mModuleName.c_str()); |
| 3633 | |
| 3634 | if (mCurTypeInstance != NULL) |
| 3635 | fullError += StrFormat("\nType: %s", TypeToString(mCurTypeInstance).c_str()); |
| 3636 | if (mCurMethodInstance != NULL) |
| 3637 | fullError += StrFormat("\nMethod: %s", MethodToString(mCurMethodInstance).c_str()); |
| 3638 | |
| 3639 | if ((mCurFilePosition.mFileInstance != NULL) && (mCurFilePosition.mFileInstance->mParser != NULL)) |
| 3640 | fullError += StrFormat("\nSource Location: %s:%d", mCurFilePosition.mFileInstance->mParser->mFileName.c_str(), mCurFilePosition.mCurLine + 1); |
| 3641 | |
| 3642 | if (sHadReentrancy) |
| 3643 | fullError += "\nError had reentrancy"; |
| 3644 | |
| 3645 | BfpSystem_FatalError(fullError.c_str(), "FATAL MODULE ERROR"); |
| 3646 | } |
| 3647 | |
| 3648 | void BfModule::FatalError(const StringImpl& error, BfFailHandleKind failHandleKind) |
| 3649 | { |
nothing calls this directly
no test coverage detected