Permalink
Browse files

Make RCTNativeModule::invokeInner explicitely return folly::none in c…

…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 0ac5a5230c4b5dd44db6a8dd7bb7752aff64d71c
Showing with 3 additions and 1 deletion.
  1. +1 −1 React/Base/RCTAssert.m
  2. +2 −0 React/CxxModule/RCTNativeModule.mm
View
@@ -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
@@ -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;
}
}

0 comments on commit 0ac5a52

Please sign in to comment.