diff --git a/React/Base/RCTBatchedBridge.m b/React/Base/RCTBatchedBridge.m index 952e748c8..443c57833 100644 --- a/React/Base/RCTBatchedBridge.m +++ b/React/Base/RCTBatchedBridge.m @@ -109,6 +109,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithDelegate:(id)dele __block NSData *sourceCode; [self loadSource:^(NSError *error, NSData *source, __unused int64_t sourceLength) { if (error) { + RCTLogWarn(@"Failed to load source: %@", error); dispatch_async(dispatch_get_main_queue(), ^{ [weakSelf stopLoadingWithError:error]; }); @@ -153,6 +154,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithDelegate:(id)dele [weakSelf injectJSONConfiguration:config onComplete:^(NSError *error) { [performanceLogger markStopForTag:RCTPLNativeModuleInjectConfig]; if (error) { + RCTLogWarn(@"Failed to inject config: %@", error); dispatch_async(dispatch_get_main_queue(), ^{ [weakSelf stopLoadingWithError:error]; }); @@ -502,7 +504,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithDelegate:(id)dele } if (loadError) { - RCTLogError(@"Failed to execute source code: %@", [loadError localizedDescription]); + RCTLogWarn(@"Failed to execute source code: %@", [loadError localizedDescription]); dispatch_async(dispatch_get_main_queue(), ^{ [self stopLoadingWithError:loadError]; }); diff --git a/React/Executors/RCTJSCExecutor.mm b/React/Executors/RCTJSCExecutor.mm index c8f6702c3..09f83a117 100644 --- a/React/Executors/RCTJSCExecutor.mm +++ b/React/Executors/RCTJSCExecutor.mm @@ -828,8 +828,9 @@ static void executeRandomAccessModule(RCTJSCExecutor *executor, uint32_t moduleI jscWrapper->JSStringRelease(sourceURL); if (!result) { + NSError *error = RCTNSErrorFromJSErrorRef(jsError, ctx, jscWrapper); dispatch_async(dispatch_get_main_queue(), ^{ - RCTFatal(RCTNSErrorFromJSErrorRef(jsError, ctx, jscWrapper)); + RCTFatal(error); [executor invalidate]; }); }