From 58bc6c3e38d45398ebec01a5399eac8d72f83adc Mon Sep 17 00:00:00 2001 From: Yannick Loriot Date: Tue, 6 Jan 2026 16:42:12 -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. ## Changelog: - [iOS] [Fixed] - Fix unused exception parameter compile error in RCTUIManager catch block in certain build mode Reviewed By: lodhaayush Differential Revision: D90192993 fbshipit-source-id: bd17fc04941ac55e529e6d851632a5febdc1c76e --- 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 c3d1cf6d724..689b63d077a 100644 --- a/packages/react-native/React/Modules/RCTUIManager.mm +++ b/packages/react-native/React/Modules/RCTUIManager.mm @@ -1248,7 +1248,7 @@ RCT_EXPORT_METHOD( [[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); } };