From 438f45af7287540368e64ea65bb865dd0a0e9e95 Mon Sep 17 00:00:00 2001 From: CoreRasurae <luis.p.mendes@gmail.com> Date: Fri, 27 Apr 2018 23:12:34 +0100 Subject: [PATCH] Fix: Exception handling when calling Java method OpenCLDevice.configure() to not hide exceptions --- CHANGELOG.md | 2 ++ src/cpp/JNIHelper.cpp | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aab4408..4d9c6a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 1.4.1 +* Fixed exception handling when calling Java method OpenCLDevice.configure() to not hide exceptions + ## 1.4.0 * Fixed local arrays handling 1D and ND, to cope with arrays resizing across kernel executions diff --git a/src/cpp/JNIHelper.cpp b/src/cpp/JNIHelper.cpp index b7cd47b..82e9eca 100644 --- a/src/cpp/JNIHelper.cpp +++ b/src/cpp/JNIHelper.cpp @@ -66,9 +66,6 @@ void JNIHelper::callVoidWithException(JNIEnv *jenv, jobject instance, const char throw std::string("bummer getting method '") + methodName + "', '()V' from instance"; jenv->CallVoidMethod(instance, methodId); - if (jenv->ExceptionCheck()) - throw std::string("bummer calling '") + methodName + "', '()V'"; - } catch(std::string& s) { jenv->ExceptionClear(); throw s; -- GitLab