Skip to content

Commit

Permalink
added try catch at the very beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
nacrt committed Mar 2, 2021
1 parent 51cedeb commit a551ee6
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions SkyblockClient/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,28 @@ public string PackDocument

public MainWindow()
{

if (Globals.isDebugEnabled)
if (!Globals.isDebugEnabled)
{
Utils.Info("Thank you for using SkyClient", "This is the output Console and will display information important to the developer!");
}

Globals.MainWindow = this;
Utils.LoadSettings();
InitializeComponent();
PostConstruct();

var errorAt = "try";
try
{
errorAt = "Utils.LoadSettings();";
Utils.LoadSettings();
errorAt = "InitializeComponent();";
InitializeComponent();
errorAt = "PostConstruct();";
PostConstruct();
}
catch (Exception e)
{
Utils.Error("UNKOWN FATAL ERROR INITIALIZING INSTALLER");
Utils.Log(e, "errorAt: " + errorAt, "unkown fatal error initizialing installer");
}
}

public async void PostConstruct()
Expand Down

0 comments on commit a551ee6

Please sign in to comment.