增加try 防止崩溃
This commit is contained in:
1 parent
833c653d3e
commit
912d7f9ca3
1 file changed
+14
@@ -41,6 +41,8 @@ public class ImageCacheService
|
||||
public static Dictionary<string, ImageCache> GetImageCaches(PDDProductInfo product)
|
||||
{
|
||||
Dictionary<string, ImageCache> wxImgMapDic = new Dictionary<string, ImageCache>(StringComparer.OrdinalIgnoreCase);
|
||||
try
|
||||
{
|
||||
//if (EnvironmentHelper.IsProduction)
|
||||
//{
|
||||
// return wxImgMapDic;
|
||||
@@ -73,6 +75,11 @@ public class ImageCacheService
|
||||
wxImgMapDic[item.Md5] = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
return wxImgMapDic;
|
||||
}
|
||||
|
||||
@@ -82,6 +89,8 @@ public class ImageCacheService
|
||||
/// <param name="platform"></param>
|
||||
/// <param name="images"></param>
|
||||
public static void SaveImageCaches(PlatformType platform, IEnumerable<ImageCache> images)
|
||||
{
|
||||
try
|
||||
{
|
||||
//if (EnvironmentHelper.IsProduction)
|
||||
//{
|
||||
@@ -118,6 +127,11 @@ public class ImageCacheService
|
||||
{
|
||||
item.IsCache = !failed.Contains(item.Md5, StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user