mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove unused exception parameter from hermes/unittests/API/CDPAgentTest.cpp (#53213)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
85b47afb48
commit
9eb90f8911
@@ -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()
|
||||
|
||||
@@ -31,7 +31,7 @@ TEST(RecoverableError, RunRethrowingAsRecoverableFallthroughTest) {
|
||||
RecoverableError::runRethrowingAsRecoverable<std::runtime_error>(
|
||||
[]() { 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");
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user