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 2016-07-13 16:39:12 -07:00 committed by Facebook Github Bot 2
parent 90c2605950
commit 37d03396c6
1 changed files with 2 additions and 1 deletions

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;
}