2 #include "cetlib_except/exception.h" 7 #include <experimental/iterator> 15 std::string
printColl(
const C& coll,
const std::string& delim)
17 if (coll.empty())
return "";
20 std::stringstream msg;
22 std::copy(
begin(coll),
end(coll), std::experimental::make_ostream_joiner(msg, delim));
28 if (!err.IsOk())
throw cet::exception(
"TritonServerFailure") << msg <<
": " << err;
33 if (!err.IsOk())
MF_LOG_WARNING(
"TritonServerWarning") << msg <<
": " << err;
41 const std::string& delim);
43 const std::string& delim);
45 const std::string& delim);
47 const std::string& delim);
std::string printColl(const C &coll, const std::string &delim)
bool warnIfError(const Error &err, std::string_view msg)
void throwIfError(const Error &err, std::string_view msg)
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
triton::client::Error Error
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
#define MF_LOG_WARNING(category)
cet::coded_exception< error, detail::translate > exception