* Fix bug #37592, improved error message readability

git-svn-id: trunk@46753 -
This commit is contained in:
michael 2020-09-02 21:37:44 +00:00
parent 1e38369d06
commit 3722c820c9

View File

@ -175,9 +175,10 @@ Resourcestring
SErrExpectedColon = 'Expected colon (:), got token "%s".'; SErrExpectedColon = 'Expected colon (:), got token "%s".';
//SErrEmptyElement = 'Empty element encountered.'; //SErrEmptyElement = 'Empty element encountered.';
SErrExpectedElementName = 'Expected element name, got token "%s"'; SErrExpectedElementName = 'Expected element name, got token "%s"';
SExpectedCommaorBraceClose = 'Expected , or ], got token "%s".'; SExpectedCommaorBraceClose = 'Expected comma (,) or square bracket (]), got token "%s".';
SErrInvalidNumber = 'Number is not an integer or real number: %s'; SErrInvalidNumber = 'Number is not an integer or real number: %s';
SErrNoScanner = 'No scanner. No source specified ?'; SErrNoScanner = 'No scanner. No source specified ?';
SErrorAt = 'Error at line %d, Pos %d: ';
{ TBaseJSONReader } { TBaseJSONReader }
@ -408,7 +409,7 @@ Var
begin begin
S:=Format(Msg,[CurrentTokenString]); S:=Format(Msg,[CurrentTokenString]);
S:=Format('Error at line %d, Pos %d:',[FScanner.CurRow,FSCanner.CurColumn])+S; S:=Format(SErrorAt,[FScanner.CurRow,FSCanner.CurColumn])+S;
Raise EJSONParser.Create(S); Raise EJSONParser.Create(S);
end; end;