MCPcopy Create free account
hub / github.com/colmap/colmap / AggregateException

Method AggregateException

src/colmap/util/threading.h:186–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184class AggregateException : public std::exception {
185 public:
186 explicit AggregateException(std::vector<std::exception_ptr> excs)
187 // NOLINTNEXTLINE(bugprone-throw-keyword-missing)
188 : exceptions_(std::move(excs)) {
189 message_ =
190 std::to_string(exceptions_.size()) + " task(s) threw exception(s):\n";
191 for (size_t i = 0; i < exceptions_.size(); ++i) {
192 try {
193 std::rethrow_exception(exceptions_[i]);
194 } catch (const std::exception& e) {
195 message_ += e.what();
196 } catch (...) {
197 message_ += "Unknown exception";
198 }
199 if (i + 1 < exceptions_.size()) {
200 message_ += "\n";
201 }
202 }
203 }
204
205 const char* what() const noexcept override { return message_.c_str(); }
206

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80
whatMethod · 0.80

Tested by

no test coverage detected