mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
handle ce fail mFile index of -1
This commit is contained in:
parent
d7f0c6523d
commit
55c83d7076
1 changed files with 12 additions and 10 deletions
|
@ -2953,16 +2953,18 @@ BfError* CeContext::Fail(const CeFrame& curFrame, const StringImpl& str)
|
|||
}
|
||||
|
||||
if ((emitEntry != NULL) && (emitEntry->mFile != -1))
|
||||
{
|
||||
err += StrFormat(" at line% d:%d in %s", emitEntry->mLine + 1, emitEntry->mColumn + 1, ceFunction->mFiles[emitEntry->mFile].c_str());
|
||||
|
||||
auto moreInfo = passInstance->MoreInfo(err, mCeMachine->mCeModule->mCompiler->GetAutoComplete() != NULL);
|
||||
if ((moreInfo != NULL) && (emitEntry != NULL))
|
||||
{
|
||||
BfErrorLocation* location = new BfErrorLocation();
|
||||
location->mFile = ceFunction->mFiles[emitEntry->mFile];
|
||||
location->mLine = emitEntry->mLine;
|
||||
location->mColumn = emitEntry->mColumn;
|
||||
moreInfo->mLocation = location;
|
||||
auto moreInfo = passInstance->MoreInfo(err, mCeMachine->mCeModule->mCompiler->GetAutoComplete() != NULL);
|
||||
if ((moreInfo != NULL))
|
||||
{
|
||||
BfErrorLocation* location = new BfErrorLocation();
|
||||
location->mFile = ceFunction->mFiles[emitEntry->mFile];
|
||||
location->mLine = emitEntry->mLine;
|
||||
location->mColumn = emitEntry->mColumn;
|
||||
moreInfo->mLocation = location;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue