[fpc-devel] fpjson/jsonparser: EJSONScanner vs EScannerError
michael.vancanneyt at wisa.be
michael.vancanneyt at wisa.be
Mon May 30 09:22:20 CEST 2011
On Sun, 29 May 2011, Luiz Americo Pereira Camara wrote:
> On 29/5/2011 18:57, Michael Van Canneyt wrote:
>>
>>
>> On Sun, 29 May 2011, Luiz Americo Pereira Camara wrote:
>>
>>> I found that to handle error while parsing json through TJSONParser is
>>> necessary to consider two types of exceptions:
>>>
>>> EJSONScanner from jsonparser
>>> EScannerError from jsonscanner
>
>>> Well, there are 2 different kinds of errors: scanner errors, and parser
>>> errors.
>> They should have 2 different classes.
>
> OK
>
> EJSONScanner seems misleading since hints to a scanner error
You are right, it is misleading.
>
>>
>>> Should a bug report be made?
>>
>> You can submit a request so they are merged (or one made a descendent of
>> the other).
>>
> Done:
>
> http://bugs.freepascal.org/view.php?id=19444
Fixed. Renamed and made descendent of EParserError (from Classes unit), so
you have to test for 1 exception only.
Michael.
More information about the fpc-devel
mailing list