diff --git a/libs/fbjni/cxx/fbjni/detail/Exceptions.cpp b/libs/fbjni/cxx/fbjni/detail/Exceptions.cpp index 3ccd7386b..e61beecaa 100644 --- a/libs/fbjni/cxx/fbjni/detail/Exceptions.cpp +++ b/libs/fbjni/cxx/fbjni/detail/Exceptions.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-present, Facebook, Inc. + * Copyright (c) Facebook, Inc. * * This source code is licensed under the MIT license found in the LICENSE * file in the root directory of this source tree. @@ -120,13 +120,13 @@ void throwPendingJniExceptionAsCppException() { return; } - auto throwable = adopt_local(env->ExceptionOccurred()); + auto throwable = env->ExceptionOccurred(); if (!throwable) { throw std::runtime_error("Unable to get pending JNI exception."); } env->ExceptionClear(); - throw JniException(throwable); + throw JniException(adopt_local(throwable)); } void throwCppExceptionIf(bool condition) {