mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
为代码报错提供报错信息 #217
This commit is contained in:
parent
5ee885090e
commit
82ff631853
@ -41,6 +41,7 @@ namespace VPet_Simulator.Windows
|
|||||||
public HashSet<string> Tag = new HashSet<string>();
|
public HashSet<string> Tag = new HashSet<string>();
|
||||||
public bool SuccessLoad = true;
|
public bool SuccessLoad = true;
|
||||||
public DateTime CacheDate;
|
public DateTime CacheDate;
|
||||||
|
public string ErrorMessage;
|
||||||
public static string INTtoVER(int ver) => $"{ver / 100}.{ver % 100:00}";
|
public static string INTtoVER(int ver) => $"{ver / 100}.{ver % 100:00}";
|
||||||
public static void LoadImage(MainWindow mw, DirectoryInfo di)
|
public static void LoadImage(MainWindow mw, DirectoryInfo di)
|
||||||
{
|
{
|
||||||
@ -257,8 +258,9 @@ namespace VPet_Simulator.Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
ErrorMessage = e.Message;
|
||||||
SuccessLoad = false;
|
SuccessLoad = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -268,8 +270,9 @@ namespace VPet_Simulator.Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
|
ErrorMessage = e.Message;
|
||||||
Tag.Add("该模组已损坏");
|
Tag.Add("该模组已损坏");
|
||||||
SuccessLoad = false;
|
SuccessLoad = false;
|
||||||
}
|
}
|
||||||
|
@ -761,9 +761,9 @@ namespace VPet_Simulator.Windows
|
|||||||
foreach (CoreMOD cm in CoreMODs)
|
foreach (CoreMOD cm in CoreMODs)
|
||||||
if (!cm.SuccessLoad)
|
if (!cm.SuccessLoad)
|
||||||
if (cm.Tag.Contains("该模组已损坏"))
|
if (cm.Tag.Contains("该模组已损坏"))
|
||||||
MessageBoxX.Show("模组 {0} 插件损坏\n虚拟桌宠模拟器未能成功加载该插件\n请联系作者修复该问题".Translate(cm.Name), "该模组已损坏".Translate());
|
MessageBoxX.Show("模组 {0} 插件损坏\n虚拟桌宠模拟器未能成功加载该插件\n请联系作者修复该问题".Translate(cm.Name) + '\n' + cm.ErrorMessage, "该模组已损坏".Translate());
|
||||||
else if (Set.IsPassMOD(cm.Name))
|
else if (Set.IsPassMOD(cm.Name))
|
||||||
MessageBoxX.Show("模组 {0} 的代码插件损坏\n虚拟桌宠模拟器未能成功加载该插件\n请联系作者修复该问题".Translate(cm.Name), "{0} 未加载代码插件".Translate(cm.Name));
|
MessageBoxX.Show("模组 {0} 的代码插件损坏\n虚拟桌宠模拟器未能成功加载该插件\n请联系作者修复该问题".Translate(cm.Name) + '\n' + cm.ErrorMessage, "{0} 未加载代码插件".Translate(cm.Name));
|
||||||
else if (Set.IsMSGMOD(cm.Name))
|
else if (Set.IsMSGMOD(cm.Name))
|
||||||
MessageBoxX.Show("由于 {0} 包含代码插件\n虚拟桌宠模拟器已自动停止加载该插件\n请手动前往设置允许启用该mod 代码插件".Translate(cm.Name), "{0} 未加载代码插件".Translate(cm.Name));
|
MessageBoxX.Show("由于 {0} 包含代码插件\n虚拟桌宠模拟器已自动停止加载该插件\n请手动前往设置允许启用该mod 代码插件".Translate(cm.Name), "{0} 未加载代码插件".Translate(cm.Name));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user