mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-06 09:36:15 +02:00
* Fix bug #37592, improved error message readability
git-svn-id: trunk@46753 -
This commit is contained in:
parent
1e38369d06
commit
3722c820c9
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user