Support #1737
Improving the debugging capabilities of JsonCppProcessors
0%
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