Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

Commented Unassigned: Aborted(Core Dumped) [74]

$
0
0
Hi,

web::http::client::http_client client("http://10.18.26.63:8080");
client.request(web::http::methods::GET, ("/wm/device/")).then([=](pplx::task<web::http::http_response> task)
{
...
}

I have used the above code to establish an request at 10.18.26.63:8080 . If this server is running then it is working fine . But when the server is not running at this URL, The program is getting terminated abruptly with : error message as " Aborted(Core Dumped) ". How can i handle this ?
Comments: Hey srinivasdba Did you try to catch the exception from the response task in the continuation? ``` client.request(web::http::methods::GET, U("/wm/device/")).then([=](pplx::task<web::http::http_response> t) { try { auto resp = t.get(); } catch(const http_exception& ex) { std::cout << "exception:" << ex.what(); } }); ``` Upon execution, are you able to catch the exception? Does it still core dump after catching the exception? Thanks Kavya

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>