code:
try
{
cpp_redis::client client;
client.connect(ip, 6379, [&](const std::string& host, std::size_t port, cpp_redis::connect_state status) {});
client.sync_commit();
client.hgetall(key, [](const cpp_redis::reply& reply){
throw std::runtime_error("what happend!");
});
client.sync_commit();
}
catch(const std::exception& e)
{
std::cerr << e.what() << '\n';
}
when I throw an exception in the labmda expression of hgetall, it goes to line 70 (in the file thread_pool.cpp).
Continue debugging, programm will pause when excute to line 124 (in the file thread_pool.cpp).
So, how can i get the exception out of the lambda expression?
platform: Windows10, VS2019-16.7.5
Thank you!