13 #include "error_impl.h"
14 #include "FaissException.h"
17 thread_local std::exception_ptr faiss_last_exception;
19 const char* faiss_get_last_error() {
20 if (faiss_last_exception) {
22 std::rethrow_exception(faiss_last_exception);
23 }
catch (std::exception& e) {