Repository: geode-native Updated Branches: refs/heads/develop 2e2f0f8ae -> 80e4bb413
GEODE-2873: Fixes character conversion of exceptions from server. Project: http://git-wip-us.apache.org/repos/asf/geode-native/repo Commit: http://git-wip-us.apache.org/repos/asf/geode-native/commit/80e4bb41 Tree: http://git-wip-us.apache.org/repos/asf/geode-native/tree/80e4bb41 Diff: http://git-wip-us.apache.org/repos/asf/geode-native/diff/80e4bb41 Branch: refs/heads/develop Commit: 80e4bb413ba5c2709d132367f22318b47bffe141 Parents: 2e2f0f8 Author: Jacob Barrett <[email protected]> Authored: Wed May 3 13:07:36 2017 -0700 Committer: Jacob Barrett <[email protected]> Committed: Wed May 3 13:08:26 2017 -0700 ---------------------------------------------------------------------- src/cppcache/src/TcrMessage.hpp | 5 +++-- src/cppcache/src/Utils.hpp | 7 ++----- 2 files changed, 5 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode-native/blob/80e4bb41/src/cppcache/src/TcrMessage.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/src/TcrMessage.hpp b/src/cppcache/src/TcrMessage.hpp index 96fd5b1..d7fdf93 100644 --- a/src/cppcache/src/TcrMessage.hpp +++ b/src/cppcache/src/TcrMessage.hpp @@ -44,6 +44,7 @@ #include <map> #include <vector> + namespace apache { namespace geode { namespace client { @@ -317,10 +318,10 @@ class CPPCACHE_EXPORT TcrMessage { const std::map<std::string, int>* getCqs() const; bool getBoolValue() const { return m_boolValue; }; inline const char* getException() { - exceptionMessage = (m_value == NULLPTR ? CacheableString::create("(null)") - : m_value->toString()); + exceptionMessage = Utils::getCacheableString(m_value); return exceptionMessage->asChar(); } + const char* getMsgData() const; const char* getMsgHeader() const; const char* getMsgBody() const; http://git-wip-us.apache.org/repos/asf/geode-native/blob/80e4bb41/src/cppcache/src/Utils.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/src/Utils.hpp b/src/cppcache/src/Utils.hpp index 56520c3..b6a7a17 100644 --- a/src/cppcache/src/Utils.hpp +++ b/src/cppcache/src/Utils.hpp @@ -129,7 +129,6 @@ class CPPCACHE_EXPORT Utils { const CacheableKeyPtr& key = staticCast<CacheableKeyPtr>(val); return getCacheableKeyString(key); } else { - std::string str; const CacheableStringPtr& cStr = val->toString(); if (cStr != NULLPTR) { if (cStr->isCString()) { @@ -139,13 +138,11 @@ class CPPCACHE_EXPORT Utils { (void)logWideString(buf, _GF_MSG_LIMIT, cStr->asWChar()); return CacheableString::create(buf); } - } else { - return CacheableString::create("(null)"); } } - } else { - return CacheableString::create("(null)"); } + + return CacheableString::create("(null)"); } inline static int64_t startStatOpTime() {
