stevetgates, thanks for the reply! I'm currently working on iOS, and it turns out I am only seeing the issue with the i386 arch simulators. All of the other architectures for iOS seem to be working just fine, meaning I am able to catch the appropriate web::http::http_exception. I am able to reproduce the issue easily on the i386 simulators if I turn off my WiFi and attempt to run the above code. I added a C++ exception breakpoint and I can clearly see that cpprest is throwing a web::http::http_exception. Also, on the i386 devices, the unhandled exception gets printed to the console as -- "libc++abi.dylib: terminating with uncaught exception of type web::http::http_exception: Error resolving address" . Not sure what, specifically, would cause the i386 arch to not catch the exception? If it helps I am using XCode 6.3.1 and iOS 8.3 simulators.
roschuma, thanks for the reply also! Makes a lot of sense. The semantics here are very similar to other promise libraries that I have used in the past, with .then() and .fail() handlers. The value vs. task based continuations are an interesting syntax here. I need to do a lot of clean-up around the code that I posted as I am just starting to get my feet wet with the pplx tasks :) Do you, or stevetgates, have any best practices around using cpprest or pplx tasks in general ? Any tough lessons learned? I am beginning to port my networking library away from AFNetworking and into a reusable c++ codebase and would love to learn as much as I can.
roschuma, thanks for the reply also! Makes a lot of sense. The semantics here are very similar to other promise libraries that I have used in the past, with .then() and .fail() handlers. The value vs. task based continuations are an interesting syntax here. I need to do a lot of clean-up around the code that I posted as I am just starting to get my feet wet with the pplx tasks :) Do you, or stevetgates, have any best practices around using cpprest or pplx tasks in general ? Any tough lessons learned? I am beginning to port my networking library away from AFNetworking and into a reusable c++ codebase and would love to learn as much as I can.