summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/json/json.hpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-05-28 04:39:18 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-05-28 04:39:18 +0000
commitf278315081b24b59bf73e9613e552e3519200a71 (patch)
treecdfe0e8d00e2c3e8002284c4541429f91cb66e68 /sca-cpp/trunk/modules/json/json.hpp
parentc3eb9d1e20e1f8a7a101854d6a883692cac4e8d0 (diff)
Improve error reporting with a reason code. Improve debug and audit logging. Fix test scripts to cleanup state from previous builds and correctly report test errors.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1343138 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/json/json.hpp')
-rw-r--r--sca-cpp/trunk/modules/json/json.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sca-cpp/trunk/modules/json/json.hpp b/sca-cpp/trunk/modules/json/json.hpp
index 39c56b6863..85579c1b28 100644
--- a/sca-cpp/trunk/modules/json/json.hpp
+++ b/sca-cpp/trunk/modules/json/json.hpp
@@ -72,7 +72,7 @@ const failable<list<value> > readJSON(const list<string>& ilist, const js::JSCon
if(!JS_FinishJSONParse(cx, parser, JSVAL_NULL))
return mkfailure<list<value> >("JS_FinishJSONParse failed");
if(!hasContent(consumed))
- return mkfailure<list<value> >(reason(consumed));
+ return mkfailure<list<value> >(consumed);
return list<value>(js::jsValToValue(val, cx));
}
@@ -149,7 +149,7 @@ const failable<list<string> > jsonResult(const value& id, const value& val, js::
const failable<value> jsonResultValue(const list<string>& s, js::JSContext& cx) {
const failable<list<value> > jsres = json::readJSON(s, cx);
if (!hasContent(jsres))
- return mkfailure<value>(reason(jsres));
+ return mkfailure<value>(jsres);
const list<value> rval(cadr<value>(elementsToValues(content(jsres))));
const value val = cadr(rval);
if (isList(val) && !js::isJSArray(val))