50 std::ostringstream log;
51 std::ostringstream err;
62 log <<
"Processing Directed graph\n";
67 log <<
"Processing Undirected graph\n";
70 pgr_johnson(undigraph, *return_count, return_tuples);
74 if (*return_count == 0) {
75 log <<
"No result generated, report this error\n";
76 *log_msg =
pgr_msg(err.str().c_str());
77 *return_tuples = NULL;
83 *log_msg = log.str().empty()?
87 (*return_tuples) =
pgr_free(*return_tuples);
90 *err_msg =
pgr_msg(err.str().c_str());
91 *log_msg =
pgr_msg(log.str().c_str());
92 }
catch (std::exception &except) {
93 (*return_tuples) =
pgr_free(*return_tuples);
96 *err_msg =
pgr_msg(err.str().c_str());
97 *log_msg =
pgr_msg(log.str().c_str());
99 (*return_tuples) =
pgr_free(*return_tuples);
101 err <<
"Caught unknown exception!";
102 *err_msg =
pgr_msg(err.str().c_str());
103 *log_msg =
pgr_msg(log.str().c_str());