Author: jsdelfino
Date: Mon Aug 26 05:18:19 2013
New Revision: 1517424
URL: http://svn.apache.org/r1517424
Log:
Change curl-get utility to display error message instead of aborting on error.
Modified:
tuscany/sca-cpp/trunk/modules/http/curl-get.cpp
Modified: tuscany/sca-cpp/trunk/modules/http/curl-get.cpp
URL:
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/curl-get.cpp?rev=1517424&r1=1517423&r2=1517424&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/curl-get.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/http/curl-get.cpp Mon Aug 26 05:18:19 2013
@@ -35,8 +35,10 @@ namespace http {
const bool testGet(const string& url, const string& ca = "", const string&
cert = "", const string& key = "") {
const CURLSession ch(ca, cert, key, "", 0);
const failable<value> val = get(url, ch);
- assert(hasContent(val));
- cout << content(val) << endl;
+ if(!hasContent(val))
+ cerr << reason(val) << endl;
+ else
+ cout << content(val) << endl;
return true;
}