Project

General

Profile

Support #1737

Improving the debugging capabilities of JsonCppProcessors

Added by Liu, Ao about 8 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
21 August 2015
Due date:
% Done:

0%

Estimated time:
Workflow:
New Issue

Description

While developing the Ckov MC Digitizer, I found that a part of the JsonCppProcessors can be improved:

In src/common_cpp/JsonCppProcessors/ObjectProcessor-inl.hh, for example.
In throw: throw(Exception(Exception::recoverable,"Attempt to pass a json "+tp+" type as an object","ObjectProcessor<ObjectType>::JsonToCpp"));

While this tp tells people what type of the Json data is, it does not tell where it comes from. This could be changed to:
throw(Exception(Exception::recoverable,
"Attempt to pass a json "+tp+" type as an object" + ", its value is " +JsonWrapper::JsonToString(json_object) + ", and it is in " + JsonWrapper::Path::GetPath(json_object),
"ObjectProcessor<ObjectType>::JsonToCpp"));

Similar sentences can be added to other processors.

No data to display

Also available in: Atom PDF