Simplify JS error to NSError API
Summary: No need to specify duplicative information. Reviewed By: javache Differential Revision: D3550805 fbshipit-source-id: b5abc3f1c74e26b4d4641c29fedba189cc46406e
This commit is contained in:
parent
f15031a374
commit
3b4120d595
|
@ -60,7 +60,7 @@ RCT_EXTERN NSString *const RCTJavaScriptContextCreatedNotification;
|
|||
* If available, the error's userInfo property will contain the JS stacktrace under
|
||||
* the RCTJSStackTraceKey key.
|
||||
*/
|
||||
- (NSError *)convertJSErrorToNSError:(JSValueRef)jsError context:(JSContextRef)context;
|
||||
- (NSError *)errorForJSError:(JSValue *)jsError;
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
|
|
|
@ -238,9 +238,9 @@ static NSError *RCTNSErrorFromJSError(RCTJSCWrapper *jscWrapper, JSContextRef co
|
|||
return [NSError errorWithDomain:RCTErrorDomain code:1 userInfo:errorInfo];
|
||||
}
|
||||
|
||||
- (NSError *)convertJSErrorToNSError:(JSValueRef)jsError context:(JSContextRef)context
|
||||
- (NSError *)errorForJSError:(JSValue *)jsError
|
||||
{
|
||||
return RCTNSErrorFromJSError(_jscWrapper, context, jsError);
|
||||
return RCTNSErrorFromJSError(_jscWrapper, jsError.context.JSGlobalContextRef, jsError.JSValueRef);
|
||||
}
|
||||
|
||||
#if RCT_DEV
|
||||
|
|
Loading…
Reference in New Issue