Hi Joecc,
I think you are confused a bit. The http_client::request method is asynchronous, so it will immediately return and you will continue to run your OnButtonClickRun function. The task continuation you have hooked up with the .then function will get executed at a later time on a different thread. If you want to take some action in your task continuation when an exception occurs you will have to so some signaling or something like set and event. How do you normally exit your application when an errors occurs?
If you want to set a bool variable when an exception occurs you can capture a reference to one in the lambda provided to your task continuation.
Steve
I think you are confused a bit. The http_client::request method is asynchronous, so it will immediately return and you will continue to run your OnButtonClickRun function. The task continuation you have hooked up with the .then function will get executed at a later time on a different thread. If you want to take some action in your task continuation when an exception occurs you will have to so some signaling or something like set and event. How do you normally exit your application when an errors occurs?
If you want to set a bool variable when an exception occurs you can capture a reference to one in the lambda provided to your task continuation.
Steve