Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
- [GUI] Change error log handing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Razmoth committed Feb 2, 2024
1 parent b328438 commit c5870c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions AssetStudio.GUI/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ private void PreviewAsset(AssetItem assetItem)
}
catch (Exception e)
{
MessageBox.Show($"Preview {assetItem.Type}:{assetItem.Text} error\r\n{e.Message}\r\n{e.StackTrace}");
Logger.Error($"Preview {assetItem.Type}:{assetItem.Text} error\r\n{e.Message}\r\n{e.StackTrace}");
}
}

Expand Down Expand Up @@ -2472,7 +2472,7 @@ private void FMODinit()
ERRCHECK(result);
if (version < FMOD.VERSION.number)
{
MessageBox.Show($"Error! You are using an old version of FMOD {version:X}. This program requires {FMOD.VERSION.number:X}.");
Logger.Error($"Error! You are using an old version of FMOD {version:X}. This program requires {FMOD.VERSION.number:X}.");
Application.Exit();
}

Expand Down
12 changes: 6 additions & 6 deletions AssetStudio.GUI/Studio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ public static Task ExportAssets(string savePath, List<AssetItem> toExportAssets,
}
catch (Exception ex)
{
MessageBox.Show($"Export {asset.Type}:{asset.Text} error\r\n{ex.Message}\r\n{ex.StackTrace}");
Logger.Error($"Export {asset.Type}:{asset.Text} error\r\n{ex.Message}\r\n{ex.StackTrace}");
}

Progress.Report(++i, toExportCount);
Expand Down Expand Up @@ -726,7 +726,7 @@ public static Task ExportSplitObjects(string savePath, TreeNodeCollection nodes)
}
catch (Exception ex)
{
MessageBox.Show($"Export GameObject:{j.Text} error\r\n{ex.Message}\r\n{ex.StackTrace}");
Logger.Error($"Export GameObject:{j.Text} error\r\n{ex.Message}\r\n{ex.StackTrace}");
}

Progress.Report(++k, count);
Expand Down Expand Up @@ -787,7 +787,7 @@ public static Task ExportAnimatorWithAnimationClip(AssetItem animator, List<Asse
}
catch (Exception ex)
{
MessageBox.Show($"Export Animator:{animator.Text} error\r\n{ex.Message}\r\n{ex.StackTrace}");
Logger.Error($"Export Animator:{animator.Text} error\r\n{ex.Message}\r\n{ex.StackTrace}");
StatusStripUpdate("Error in export");
}
});
Expand Down Expand Up @@ -815,7 +815,7 @@ public static Task ExportObjectsWithAnimationClip(string exportPath, TreeNodeCol
}
catch (Exception ex)
{
MessageBox.Show($"Export GameObject:{gameObject.m_Name} error\r\n{ex.Message}\r\n{ex.StackTrace}");
Logger.Error($"Export GameObject:{gameObject.m_Name} error\r\n{ex.Message}\r\n{ex.StackTrace}");
StatusStripUpdate("Error in export");
}

Expand Down Expand Up @@ -848,7 +848,7 @@ public static Task ExportObjectsMergeWithAnimationClip(string exportPath, List<G
}
catch (Exception ex)
{
MessageBox.Show($"Export Model:{name} error\r\n{ex.Message}\r\n{ex.StackTrace}");
Logger.Error($"Export Model:{name} error\r\n{ex.Message}\r\n{ex.StackTrace}");
StatusStripUpdate("Error in export");
}
if (Properties.Settings.Default.openAfterExport)
Expand Down Expand Up @@ -881,7 +881,7 @@ public static Task ExportNodesWithAnimationClip(string exportPath, List<TreeNode
}
catch (Exception ex)
{
MessageBox.Show($"Export Model:{name} error\r\n{ex.Message}\r\n{ex.StackTrace}");
Logger.Error($"Export Model:{name} error\r\n{ex.Message}\r\n{ex.StackTrace}");
StatusStripUpdate("Error in export");
}
}
Expand Down

0 comments on commit c5870c9

Please sign in to comment.