52 std::ostringstream log;
53 std::ostringstream err;
54 std::ostringstream notice;
63 std::vector<pgr_makeConnected_t> results;
68 log <<
"Working with Undirected Graph\n";
73 logstr += fn_makeConnected.
get_log();
76 auto count = results.size();
79 (*return_tuples) = NULL;
83 *log_msg =
pgr_msg(notice.str().c_str());
87 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
88 log <<
"\nConverting a set of traversals into the tuples";
89 for (
size_t i = 0; i < count; i++) {
90 *((*return_tuples) + i) = results[i];
92 (*return_count) = count;
95 *log_msg = log.str().empty()?
98 *notice_msg = notice.str().empty()?
102 (*return_tuples) =
pgr_free(*return_tuples);
104 err << except.
what();
105 *err_msg =
pgr_msg(err.str().c_str());
106 *log_msg =
pgr_msg(log.str().c_str());
107 }
catch (std::exception &except) {
108 (*return_tuples) =
pgr_free(*return_tuples);
110 err << except.what();
111 *err_msg =
pgr_msg(err.str().c_str());
112 *log_msg =
pgr_msg(log.str().c_str());
114 (*return_tuples) =
pgr_free(*return_tuples);
116 err <<
"Caught unknown exception!";
117 *err_msg =
pgr_msg(err.str().c_str());
118 *log_msg =
pgr_msg(log.str().c_str());