Skip to content

Commit 9eb90f8

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Remove unused exception parameter from hermes/unittests/API/CDPAgentTest.cpp (#53213)
Summary: Pull Request resolved: #53213 `-Wunused-exception-parameter` has identified an unused exception parameter. This diff removes it. This: ``` try { ... } catch (exception& e) { // no use of e } ``` should instead be written as ``` } catch (exception&) { ``` If the code compiles, this is safe to land. Reviewed By: dtolnay Differential Revision: D79968851 fbshipit-source-id: 18f2e6861f099915b1aad6aba58217ba94eb10c8
1 parent 85b47af commit 9eb90f8

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/react-native/ReactCommon/cxxreact/CxxNativeModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void CxxNativeModule::invoke(
200200
"CxxMethodCallDispatch", "module", moduleName, "method", method.name);
201201
try {
202202
method.func(params, first, second);
203-
} catch (const facebook::xplat::JsArgumentException& ex) {
203+
} catch (const facebook::xplat::JsArgumentException&) {
204204
throw;
205205
} catch (std::exception& e) {
206206
LOG(ERROR) << "std::exception. Method call " << method.name.c_str()

packages/react-native/ReactCommon/cxxreact/tests/RecoverableErrorTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ TEST(RecoverableError, RunRethrowingAsRecoverableFallthroughTest) {
3131
RecoverableError::runRethrowingAsRecoverable<std::runtime_error>(
3232
[]() { throw std::logic_error("catch me"); });
3333
FAIL() << "Unthrown exception";
34-
} catch (const RecoverableError& err) {
34+
} catch (const RecoverableError&) {
3535
FAIL() << "Recovered exception that should have fallen through";
3636
} catch (const std::exception& err) {
3737
ASSERT_STREQ(err.what(), "catch me");

packages/react-native/ReactCommon/react/nativemodule/webperformance/NativePerformance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ PerformanceEntryReporter::UserTimingDetailProvider getDetailProviderFromEntry(
119119
try {
120120
auto detail = entry.asObject(rt).getProperty(rt, "detail");
121121
return jsi::dynamicFromValue(rt, detail);
122-
} catch (jsi::JSIException& ex) {
122+
} catch (jsi::JSIException&) {
123123
return nullptr;
124124
}
125125
};

0 commit comments

Comments
 (0)