MCPcopy Create free account
hub / github.com/apache/qpid-proton / parse_default

Function parse_default

cpp/src/connect_config.cpp:269–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267}
268
269string parse_default(connection_options& opts) {
270 std::string name;
271 std::ifstream f;
272 bool good = config_file(f, name);
273 if (!good) {
274 throw err("no default configuration, last tried: " + name);
275 }
276 try {
277 Value root;
278 f >> root;
279 f.close();
280 return parse(root, opts);
281 } catch (const std::ifstream::failure& e) {
282 throw err(msg() << "io error parsing '" << name << "': " << e.what());
283 } catch (const std::exception& e) {
284 throw err(msg() << "error parsing '" << name << "': " << e.what());
285 } catch (...) {
286 throw err(msg() << "error parsing '" << name << "'");
287 }
288}
289
290}} // namespace proton::connect_config

Callers

nothing calls this directly

Calls 6

config_fileFunction · 0.85
errFunction · 0.85
msgClass · 0.85
parseFunction · 0.70
closeMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected