No longer throw when attempting to hash (#2007)
Co-authored-by: Aleksey <amoroz@uw.edu>
This commit is contained in:
Родитель
75785cbabc
Коммит
9947037a98
|
@ -485,31 +485,10 @@ namespace Microsoft::CodePush::ReactNative
|
|||
auto configuration{ CodePushConfig::Current().GetConfiguration() };
|
||||
if (isRunningBinaryVersion)
|
||||
{
|
||||
hstring binaryHash;
|
||||
try
|
||||
{
|
||||
auto errorMessage{ L"Error: Package hashing is currently unimplemented. Binary hash was not obtained." };
|
||||
auto error{ hresult_error(E_NOTIMPL, errorMessage) };
|
||||
CodePushUtils::Log(error);
|
||||
throw error;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
CodePushUtils::Log(L"Error obtaining hash for binary contents.");
|
||||
promise.Resolve(configuration);
|
||||
co_return;
|
||||
}
|
||||
|
||||
if (binaryHash.empty())
|
||||
{
|
||||
// The hash was not generated either due to a previous unknown error or the fact that
|
||||
// the React Native assets were not bundled in the binary (e.g. during release)
|
||||
// builds.
|
||||
promise.Resolve(configuration);
|
||||
co_return;
|
||||
}
|
||||
|
||||
configuration.Insert(PackageHashKey, JsonValue::CreateStringValue(binaryHash));
|
||||
auto errorMessage{ L"Error: Package hashing is currently unimplemented. Binary hash was not obtained." };
|
||||
auto error{ hresult_error(E_NOTIMPL, errorMessage) };
|
||||
CodePushUtils::Log(error);
|
||||
CodePushUtils::Log(L"Error obtaining hash for binary contents.");
|
||||
promise.Resolve(configuration);
|
||||
co_return;
|
||||
}
|
||||
|
|
|
@ -172,14 +172,9 @@ namespace Microsoft::CodePush::ReactNative
|
|||
|
||||
if (needToVerifyHash)
|
||||
{
|
||||
try
|
||||
{
|
||||
auto errorMessage{ L"Error: package content verification is not currently supported." };
|
||||
hresult_error error{ E_NOTIMPL, errorMessage };
|
||||
CodePushUtils::Log(error);
|
||||
throw error;
|
||||
}
|
||||
catch (...) {}
|
||||
auto errorMessage{ L"Error: package content verification is not currently supported." };
|
||||
hresult_error error{ E_NOTIMPL, errorMessage };
|
||||
CodePushUtils::Log(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче