From 96f1562808fc5d2f0598c453de70b25f02ab462f Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 26 Aug 2013 05:18:19 +0000 Subject: Change curl-get utility to display error message instead of aborting on error. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1517424 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/http/curl-get.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sca-cpp/trunk/modules/http/curl-get.cpp b/sca-cpp/trunk/modules/http/curl-get.cpp index 983dd20fc5..96efcc7897 100644 --- a/sca-cpp/trunk/modules/http/curl-get.cpp +++ b/sca-cpp/trunk/modules/http/curl-get.cpp @@ -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 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; } -- cgit v1.2.3