diff --git a/packages/react-native/ReactCommon/cxxreact/CxxNativeModule.cpp b/packages/react-native/ReactCommon/cxxreact/CxxNativeModule.cpp index d14505704885..23d771bc5cbc 100644 --- a/packages/react-native/ReactCommon/cxxreact/CxxNativeModule.cpp +++ b/packages/react-native/ReactCommon/cxxreact/CxxNativeModule.cpp @@ -200,7 +200,7 @@ void CxxNativeModule::invoke( "CxxMethodCallDispatch", "module", moduleName, "method", method.name); try { method.func(params, first, second); - } catch (const facebook::xplat::JsArgumentException& ex) { + } catch (const facebook::xplat::JsArgumentException&) { throw; } catch (std::exception& e) { LOG(ERROR) << "std::exception. Method call " << method.name.c_str() diff --git a/packages/react-native/ReactCommon/cxxreact/tests/RecoverableErrorTest.cpp b/packages/react-native/ReactCommon/cxxreact/tests/RecoverableErrorTest.cpp index 622ac708beb5..50042d89782d 100644 --- a/packages/react-native/ReactCommon/cxxreact/tests/RecoverableErrorTest.cpp +++ b/packages/react-native/ReactCommon/cxxreact/tests/RecoverableErrorTest.cpp @@ -31,7 +31,7 @@ TEST(RecoverableError, RunRethrowingAsRecoverableFallthroughTest) { RecoverableError::runRethrowingAsRecoverable( []() { throw std::logic_error("catch me"); }); FAIL() << "Unthrown exception"; - } catch (const RecoverableError& err) { + } catch (const RecoverableError&) { FAIL() << "Recovered exception that should have fallen through"; } catch (const std::exception& err) { ASSERT_STREQ(err.what(), "catch me"); diff --git a/packages/react-native/ReactCommon/react/nativemodule/webperformance/NativePerformance.cpp b/packages/react-native/ReactCommon/react/nativemodule/webperformance/NativePerformance.cpp index afdf0d88f685..9ba5b10abcbd 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/webperformance/NativePerformance.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/webperformance/NativePerformance.cpp @@ -119,7 +119,7 @@ PerformanceEntryReporter::UserTimingDetailProvider getDetailProviderFromEntry( try { auto detail = entry.asObject(rt).getProperty(rt, "detail"); return jsi::dynamicFromValue(rt, detail); - } catch (jsi::JSIException& ex) { + } catch (jsi::JSIException&) { return nullptr; } };