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
This commit is contained in:
Amir Shalem
2019-01-17 07:33:24 -08:00
committed by Facebook Github Bot
parent 604a9a98a9
commit 8b8932811e

View File

@@ -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();
}
}