Well, the following codes are capsulated in a thread. Is there any way to quit the thread when catch an exception in the "catch" sub block?
.then([&](http_response resp)
{
try
{
resp_json = resp.get();
}
catch (const std::exception& e)
{
excep_str = L"Caught exception: ";
excep_str.AppendFormat(_T("%s"), e.what());
MessageBox(excep_str);
return; //this will just return to the thread function and go on
}
}
// the left codes in thread function
......