mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Catch exceptions in Window.Draw
This commit is contained in:
parent
979a5463ca
commit
d836a3e556
1 changed files with 10 additions and 1 deletions
|
|
@ -1,9 +1,11 @@
|
||||||
|
using System;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
|
||||||
using Dalamud.Configuration.Internal;
|
using Dalamud.Configuration.Internal;
|
||||||
using Dalamud.Game.ClientState.Keys;
|
using Dalamud.Game.ClientState.Keys;
|
||||||
using FFXIVClientStructs.FFXIV.Client.UI;
|
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
namespace Dalamud.Interface.Windowing;
|
namespace Dalamud.Interface.Windowing;
|
||||||
|
|
||||||
|
|
@ -284,7 +286,14 @@ public abstract class Window
|
||||||
if (this.ShowCloseButton ? ImGui.Begin(this.WindowName, ref this.internalIsOpen, this.Flags) : ImGui.Begin(this.WindowName, this.Flags))
|
if (this.ShowCloseButton ? ImGui.Begin(this.WindowName, ref this.internalIsOpen, this.Flags) : ImGui.Begin(this.WindowName, this.Flags))
|
||||||
{
|
{
|
||||||
// Draw the actual window contents
|
// Draw the actual window contents
|
||||||
this.Draw();
|
try
|
||||||
|
{
|
||||||
|
this.Draw();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.Error(ex, $"Error during Draw(): {this.WindowName}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wasFocused)
|
if (wasFocused)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue