47 int64_t **return_tuples,
52 std::ostringstream log;
53 std::ostringstream err;
54 std::ostringstream notice;
65 log <<
"Working with Undirected Graph\n";
70 auto count = results.size();
73 (*return_tuples) = NULL;
76 "No paths found between start_vid and end_vid vertices";
80 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
82 for (
const auto vertex : results) {
83 *((*return_tuples) + i) = vertex;
87 (*return_count) = count;
90 *log_msg = log.str().empty()?
93 *notice_msg = notice.str().empty()?
97 (*return_tuples) =
pgr_free(*return_tuples);
100 *err_msg =
pgr_msg(err.str().c_str());
101 *log_msg =
pgr_msg(log.str().c_str());
102 }
catch (std::exception &except) {
103 (*return_tuples) =
pgr_free(*return_tuples);
105 err << except.what();
106 *err_msg =
pgr_msg(err.str().c_str());
107 *log_msg =
pgr_msg(log.str().c_str());
109 (*return_tuples) =
pgr_free(*return_tuples);
111 err <<
"Caught unknown exception!";
112 *err_msg =
pgr_msg(err.str().c_str());
113 *log_msg =
pgr_msg(log.str().c_str());