You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by se...@apache.org on 2016/07/26 23:54:58 UTC

[1/2] incubator-trafodion git commit: [TRAFODION-1988] Better java exception handling in the java/JNI layer of TM The exception logged didn't have the type of exception. The output of Exception.toString() was concatenated after it was released and hence

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master acf48e944 -> 522acc9a7


[TRAFODION-1988] Better java exception handling in the java/JNI layer of TM
The exception logged didn't have the type of exception. The output of
Exception.toString() was concatenated after it was released and hence
it was getting junk characters


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/38c60d11
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/38c60d11
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/38c60d11

Branch: refs/heads/master
Commit: 38c60d116c254c0712bf53843f3812cce6d0de71
Parents: 0ec52bc
Author: selvaganesang <se...@esgyn.com>
Authored: Mon Jul 25 21:34:10 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Mon Jul 25 21:34:10 2016 +0000

----------------------------------------------------------------------
 .../seatrans/tm/hbasetmlib2/javaobjectinterfacetm.cpp  | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38c60d11/core/sqf/src/seatrans/tm/hbasetmlib2/javaobjectinterfacetm.cpp
----------------------------------------------------------------------
diff --git a/core/sqf/src/seatrans/tm/hbasetmlib2/javaobjectinterfacetm.cpp b/core/sqf/src/seatrans/tm/hbasetmlib2/javaobjectinterfacetm.cpp
index e6b926a..df7db02 100755
--- a/core/sqf/src/seatrans/tm/hbasetmlib2/javaobjectinterfacetm.cpp
+++ b/core/sqf/src/seatrans/tm/hbasetmlib2/javaobjectinterfacetm.cpp
@@ -425,18 +425,17 @@ bool  JavaObjectInterfaceTM::getExceptionDetails(JNIEnv *jenv)
        (jstring) jenv->CallObjectMethod(a_exception,
                                          gThrowableToStringMethodID);
     const char *msg_str;
-    if (msg_obj != NULL)
-    {
+    error_msg = new std::string("");
+    if (msg_obj != NULL) {
        msg_str = jenv->GetStringUTFChars(msg_obj, 0);
+       *error_msg += msg_str;
        jenv->ReleaseStringUTFChars(msg_obj, msg_str);
        jenv->DeleteLocalRef(msg_obj);
     }
-    else
+    else {
        msg_str = "Exception is thrown, but tostring is null";
-
-    error_msg = new std::string("");
-    *error_msg += msg_str;
-
+       *error_msg += msg_str;
+    }
     // Get the stack trace
     jobjectArray frames =
         (jobjectArray) jenv->CallObjectMethod(


[2/2] incubator-trafodion git commit: Merge [TRAFODION-1988] PR 621 Better java exception handling in TM

Posted by se...@apache.org.
Merge [TRAFODION-1988] PR 621 Better java exception handling in TM


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/522acc9a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/522acc9a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/522acc9a

Branch: refs/heads/master
Commit: 522acc9a776742d5bffbf30b07ffe314a4ec6bb0
Parents: acf48e9 38c60d1
Author: selvaganesang <se...@apache.org>
Authored: Tue Jul 26 23:52:05 2016 +0000
Committer: selvaganesang <se...@apache.org>
Committed: Tue Jul 26 23:52:05 2016 +0000

----------------------------------------------------------------------
 .../seatrans/tm/hbasetmlib2/javaobjectinterfacetm.cpp  | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------