MCPcopy Create free account
hub / github.com/PDAL/PDAL / validateInput

Method validateInput

pdal/private/OGRSpec.cpp:39–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void OGRSpec::validateInput(const std::string& ogrJsonStr)
40{
41 try
42 {
43 m_json = NL::json::parse(ogrJsonStr);
44 }
45 catch(NL::json::parse_error& e)
46 {
47 std::string s(e.what());
48 auto pos = s.find("]");
49 if (pos != std::string::npos)
50 s = s.substr(pos + 1);
51 std::stringstream msg;
52
53 msg << "Failed to parse OGR JSON with error: " << s;
54 throw error(msg.str());
55 }
56 parse();
57}
58
59void OGRSpec::validateInput(const NL::json& ogrJson)
60{

Callers

nothing calls this directly

Calls 5

strMethod · 0.80
errorClass · 0.70
parseFunction · 0.50
whatMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected