Caches the processed line in CodeBlock for better assert reporting

Adds additional context on eval and evaluate calls to better isolate script executions that are throwing errors, such as via command fields or eval() calls.
This commit is contained in:
JeffR 2026-02-21 11:03:07 -06:00
parent 2dae0fbbad
commit 171211c4e2
12 changed files with 46 additions and 16 deletions

View file

@ -35,6 +35,7 @@ using namespace Compiler;
bool CodeBlock::smInFunction = false;
CodeBlock * CodeBlock::smCodeBlockList = NULL;
StringTableEntry CodeBlock::smCurrentLineText = StringTable->EmptyString();
TorqueScriptParser *CodeBlock::smCurrentParser = NULL;
extern FuncVars gEvalFuncVars;
@ -578,6 +579,7 @@ Con::EvalResult CodeBlock::compileExec(StringTableEntry fileName, const char *in
consoleAllocReset();
name = fileName;
smCurrentLineText = inString;
if (fileName)
{