Skip to content

Commit

Permalink
Make RCTNativeModule::invokeInner explicitely return folly::none in c…
Browse files Browse the repository at this point in the history
…ase of error

Differential Revision: D6347967

fbshipit-source-id: 88788da321ca75d20b6c1a8e3d41642af7c6155e
  • Loading branch information
fromcelticpark authored and facebook-github-bot committed Nov 17, 2017
1 parent d19d137 commit 0ac5a52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion React/Base/RCTAssert.m
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void RCTFatal(NSError *error)
#endif
NSString *name = [NSString stringWithFormat:@"%@: %@", RCTFatalExceptionName, error.localizedDescription];
NSString *message = RCTFormatError(error.localizedDescription, error.userInfo[RCTJSStackTraceKey], 75);
[NSException raise:name format:@"%@", message];
@throw [[NSException alloc] initWithName:name reason:message userInfo:nil];
#if DEBUG
} @catch (NSException *e) {}
#endif
Expand Down
2 changes: 2 additions & 0 deletions React/CxxModule/RCTNativeModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ static MethodCallResult invokeInner(RCTBridge *bridge, RCTModuleData *moduleData
exception, method.JSMethodName, moduleData.name, objcParams, exception.callStackSymbols];
RCTFatal(RCTErrorWithMessage(message));
}

return folly::none;
}

}
Expand Down

0 comments on commit 0ac5a52

Please sign in to comment.