From bae7234b01926620be9cd4bbf100e406b0cbfb7f Mon Sep 17 00:00:00 2001 From: Yannick Loriot Date: Tue, 6 Jan 2026 13:22:26 -0800 Subject: [PATCH] Fix unused exception parameter compile error in RCTUIManager catch block Summary: In some configurations the errors might be stripped out and leading toward those kind of issues: ``` stderr: xplat/js/react-native-github/packages/react-native/React/Modules/RCTUIManager.mm:1251:28: error: unused exception parameter 'exception' [-Werror,-Wunused-exception-parameter] 1251 | } catch (NSException \*exception) { | ^\~\~\~\~\~\~\~\~ 1 error generated. ``` So marking the param as potentially unused. Reviewed By: lodhaayush Differential Revision: D90192993 --- packages/react-native/React/Modules/RCTUIManager.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/React/Modules/RCTUIManager.mm b/packages/react-native/React/Modules/RCTUIManager.mm index c3d1cf6d72409b..689b63d077a39c 100644 --- a/packages/react-native/React/Modules/RCTUIManager.mm +++ b/packages/react-native/React/Modules/RCTUIManager.mm @@ -1248,7 +1248,7 @@ - (void)flushUIBlocksWithCompletion:(void (^)(void))completion [[RCTComposedViewRegistry alloc] initWithUIManager:strongSelf andRegistry:strongSelf->_viewRegistry]; block(strongSelf, composedViewRegistry); } - } @catch (NSException *exception) { + } @catch (NSException *__unused exception) { RCTLogError(@"Exception thrown while executing UI block: %@", exception); } };