mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-17 14:14:17 +01:00
fix: log exceptions when drawing DataWindow data
This commit is contained in:
parent
f5926105be
commit
29a39b4be1
1 changed files with 10 additions and 0 deletions
|
|
@ -53,6 +53,7 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
private readonly string[] dataKindNames = Enum.GetNames(typeof(DataKind)).Select(k => k.Replace("_", " ")).ToArray();
|
private readonly string[] dataKindNames = Enum.GetNames(typeof(DataKind)).Select(k => k.Replace("_", " ")).ToArray();
|
||||||
|
|
||||||
private bool wasReady;
|
private bool wasReady;
|
||||||
|
private bool isExcept;
|
||||||
private string serverOpString;
|
private string serverOpString;
|
||||||
private DataKind currentKind;
|
private DataKind currentKind;
|
||||||
|
|
||||||
|
|
@ -345,9 +346,18 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
{
|
{
|
||||||
ImGui.TextUnformatted("Data not ready.");
|
ImGui.TextUnformatted("Data not ready.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.isExcept = false;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
if (!this.isExcept)
|
||||||
|
{
|
||||||
|
Log.Error(ex, "Could not draw data");
|
||||||
|
}
|
||||||
|
|
||||||
|
this.isExcept = true;
|
||||||
|
|
||||||
ImGui.TextUnformatted(ex.ToString());
|
ImGui.TextUnformatted(ex.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue