View Issue Details

IDProjectCategoryView StatusLast Update
0019444FPCFCLpublic2011-05-30 21:02
ReporterLuiz Americo Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version2.6.0Fixed in Version2.6.0 
Summary0019444: Duplicate exception classes in json parser (fpjson)
DescriptionTo catch errors while using TJSONParser is necessary to handle two different exception types:

EJSONScanner from jsonparser unit
EScannerError from jsonscanner unit

This has some drawbacks:

1) Need to check the exception type twice. Like:
    on E: EJSONScanner do
    begin
      ShowMessageFmt('Error parsing "%s" : %s', [FileName, E.Message]);
    end;
    on E: EScannerError do
    begin
      ShowMessageFmt('Error parsing "%s" : %s', [FileName, E.Message]);
    end;

2) Need to add jsonscanner unit to uses classes. Otherwise not needed.

3) EJSONScanner is supposed to be raised because of a parser error as pointed by Michael Van Canneyt in ML. The name is misleading.

TagsNo tags attached.
Fixed in Revision17610.
FPCOldBugId0
FPCTarget
Attached Files

Activities

Michael Van Canneyt

2011-05-30 09:19

administrator   ~0048719

Renamed to EJSONParser, so the name is more logical.
Made both a descendent of EParserError (from Classes unit) so checking for EParserError will catch all exceptions.

Issue History

Date Modified Username Field Change
2011-05-30 02:02 Luiz Americo New Issue
2011-05-30 02:02 Luiz Americo FPCOldBugId => 0
2011-05-30 09:11 Michael Van Canneyt Status new => assigned
2011-05-30 09:11 Michael Van Canneyt Assigned To => Michael Van Canneyt
2011-05-30 09:19 Michael Van Canneyt Fixed in Revision => 17610.
2011-05-30 09:19 Michael Van Canneyt Status assigned => resolved
2011-05-30 09:19 Michael Van Canneyt Fixed in Version => 2.5.1
2011-05-30 09:19 Michael Van Canneyt Resolution open => fixed
2011-05-30 09:19 Michael Van Canneyt Note Added: 0048719
2011-05-30 09:19 Michael Van Canneyt Target Version => 2.6.0
2011-05-30 21:02 Luiz Americo Status resolved => closed