Skip to content

Commit

Permalink
return exception type name when segcore return unkonwn exception
Browse files Browse the repository at this point in the history
Signed-off-by: aoiasd <[email protected]>
  • Loading branch information
aoiasd committed Dec 16, 2024
1 parent 9c8c1b3 commit 75265d0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions internal/core/src/futures/Future.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,13 @@ class Future : public IFuture {
ready->setValue(LeakyResult<R>(
static_cast<int>(e.get_error_code()), e.what()));
})
.thenError(folly::tag_t<std::exception>{},
[ready = ready_](const std::exception& e) {
ready->setValue(LeakyResult<R>(
milvus::UnexpectedError, e.what()));
});
.thenError(
folly::tag_t<std::exception>{},
[ready = ready_](const std::exception& e) {
ready->setValue(LeakyResult<R>(
milvus::UnexpectedError,
fmt::format("{} :{}", typeid(e).name(), e.what())));
});
}

private:
Expand Down

0 comments on commit 75265d0

Please sign in to comment.