From 8b8932811e3306c5ed35e566135893ffc72e2617 Mon Sep 17 00:00:00 2001 From: Amir Shalem Date: Thu, 17 Jan 2019 07:33:24 -0800 Subject: [PATCH] Make Yoga's libfb code to be gcc7 compatible Summary: Make the libfb jni code to be compatible with gcc7 compiler Reviewed By: davidaurelio Differential Revision: D13711390 fbshipit-source-id: 9a378a3ee4feb7e928dd97dae7d79a41f0658992 --- lib/fb/src/main/cpp/jni/Exceptions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/fb/src/main/cpp/jni/Exceptions.cpp b/lib/fb/src/main/cpp/jni/Exceptions.cpp index 8688dfbf..73166c04 100644 --- a/lib/fb/src/main/cpp/jni/Exceptions.cpp +++ b/lib/fb/src/main/cpp/jni/Exceptions.cpp @@ -219,11 +219,11 @@ void translatePendingCppExceptionToJavaException() noexcept { setJavaExceptionAndAbortOnFailure(previous); } catch (std::exception& e) { FBLOGE("unexpected exception in translatePendingCppExceptionToJavaException: %s", e.what()); - // rethrow the exception and let the noexcept handling abort. - throw; + // std::terminate will print the message of the pending exception e + std::terminate(); } catch (...) { FBLOGE("unexpected exception in translatePendingCppExceptionToJavaException"); - throw; + std::terminate(); } }