forked from LorisYounger/VPet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44c1963
commit 45d197c
Showing
1 changed file
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,10 +19,17 @@ public App() : base() | |
private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) | ||
{ | ||
e.Handled = true; | ||
|
||
var expt = e.Exception.ToString(); | ||
if (expt.Contains("value") && expt.Contains("Panuon.WPF.UI.Internal.Utils") && expt.Contains("NaN")) | ||
{ | ||
MessageBox.Show(expt, "由于修改游戏数据导致数据溢出,存档可能会出错\n开发者提醒您请不要使用过于超模的MOD".Translate()); | ||
} | ||
|
||
string errstr = "游戏发生错误,可能是".Translate() + (string.IsNullOrWhiteSpace(CoreMOD.NowLoading) ? | ||
"游戏或者MOD".Translate() : $"MOD({CoreMOD.NowLoading})") + | ||
"导致的\n如有可能请发送 错误信息截图和引发错误之前的操作 给开发者:[email protected]\n感谢您对游戏开发的支持\n".Translate() | ||
+ e.Exception.ToString(); | ||
+ expt; | ||
if (MainWindow == null) | ||
{ | ||
MessageBox.Show(errstr, "游戏致命性错误".Translate()); | ||
|