mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-13 01:18:56 +08:00
Merge pull request #262 from Microsoft/fix_error_message
Fix error message
This commit is contained in:
@@ -246,7 +246,7 @@ public class CodePushPackage {
|
||||
String relativeBundlePath = CodePushUpdateUtils.findJSBundleInUpdateContents(newUpdateFolderPath, expectedBundleFileName);
|
||||
|
||||
if (relativeBundlePath == null) {
|
||||
throw new CodePushInvalidUpdateException("Update is invalid - no files with extension .bundle, .js or .jsbundle were found in the update package.");
|
||||
throw new CodePushInvalidUpdateException("Update is invalid - A JS bundle file named \"" + expectedBundleFileName + "\" could not be found within the downloaded contents. Please check that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app's binary.");
|
||||
} else {
|
||||
if (FileUtils.fileAtPathExists(newUpdateMetadataPath)) {
|
||||
File metadataFileFromOldUpdate = new File(newUpdateMetadataPath);
|
||||
|
||||
@@ -207,7 +207,9 @@ static NSString *const UnzippedFolderName = @"unzipped";
|
||||
if (relativeBundlePath) {
|
||||
[mutableUpdatePackage setValue:relativeBundlePath forKey:RelativeBundlePathKey];
|
||||
} else {
|
||||
error = [CodePushErrorUtils errorWithMessage:@"Update is invalid - no files with extension .jsbundle or .bundle were found in the update package."];
|
||||
NSString *errorMessage = [NSString stringWithFormat:@"Update is invalid - A JS bundle file named \"%@\" could not be found within the downloaded contents. Please check that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app's binary.", expectedBundleFileName];
|
||||
|
||||
error = [CodePushErrorUtils errorWithMessage:errorMessage];
|
||||
|
||||
failCallback(error);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user