Improve error message for non-file URLs

Summary: Include the actual scheme instead of "non-file".

Reviewed By: javache

Differential Revision: D3555812

fbshipit-source-id: 3ae0490f2d8fae01a551ba2877789dc15818fc50
This commit is contained in:
Adam Ernst authored and Facebook Github Bot 2 committed 2016-07-13 16:43:38 -07:00
1 parent 90c2605950
commit 37d03396c6
1 file changed
+2 -1
+2 -1
View File
@@ -75,7 +75,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
*error = [NSError errorWithDomain:RCTJavaScriptLoaderErrorDomain
code:RCTJavaScriptLoaderErrorCannotBeLoadedSynchronously
userInfo:@{NSLocalizedDescriptionKey:
@"Cannot load non-file URLs synchronously"}];
[NSString stringWithFormat:@"Cannot load %@ URLs synchronously",
scriptURL.scheme]}];
}
return nil;
}