more desciptive error messages

This commit is contained in:
Joseph Poirier 2015-06-08 17:46:25 -05:00
parent cc0882d830
commit 6c9bd24783
2 changed files with 3 additions and 3 deletions

View file

@ -1302,7 +1302,7 @@ void ExpressionParseMacroCall(struct ParseState *Parser, struct ExpressionStack
ProgramFail(Parser, "not enough arguments to '%s'", MacroName);
if (MDef->Body.Pos == NULL)
ProgramFail(Parser, "'%s' is undefined", MacroName);
ProgramFail(Parser, "ExpressionParseMacroCall MacroName: '%s' is undefined", MacroName);
ParserCopy(&MacroParser, &MDef->Body);
MacroParser.Mode = Parser->Mode;
@ -1396,7 +1396,7 @@ void ExpressionParseFunctionCall(struct ParseState *Parser, struct ExpressionSta
int OldScopeID = Parser->ScopeID;
if (FuncValue->Val->FuncDef.Body.Pos == NULL)
ProgramFail(Parser, "'%s' is undefined", FuncName);
ProgramFail(Parser, "ExpressionParseFunctionCall FuncName: '%s' is undefined", FuncName);
ParserCopy(&FuncParser, &FuncValue->Val->FuncDef.Body);
VariableStackFrameAdd(Parser, FuncName, FuncValue->Val->FuncDef.Intrinsic ? FuncValue->Val->FuncDef.NumParams : 0);

View file

@ -349,7 +349,7 @@ void VariableGet(Picoc *pc, struct ParseState *Parser, const char *Ident, struct
if (VariableDefinedAndOutOfScope(pc, Ident))
ProgramFail(Parser, "'%s' is out of scope", Ident);
else
ProgramFail(Parser, "'%s' is undefined", Ident);
ProgramFail(Parser, "VariableGet Ident: '%s' is undefined", Ident);
}
}
}