-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved Nitrox loading logging #1221
Conversation
NitroxPatcher/Main.cs
Outdated
catch (Exception) | ||
{ | ||
Log.Error("Error while initializing and loading dependencies."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
catch (Exception) | |
{ | |
Log.Error("Error while initializing and loading dependencies."); | |
catch (Exception ex) | |
{ | |
Log.Error(ex, "Error while initializing and loading dependencies."); |
Use public static void Error(Exception ex, string message) => logger.Error(ex, message);
method variant.
NitroxPatcher/Main.cs
Outdated
@@ -28,16 +32,34 @@ public static void Execute() | |||
{ | |||
Log.Setup(true); | |||
Optional.ApplyHasValueCondition<Object>(o => (bool)o); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially explicitly use UnityEngine.Object
and remove the using Object = UnityEngine.Object
to avoid possible conflation with C#'s object
?
Also fixes issue where Launcher stays stuck when you try to close it due to trying to win32 postmessage on a dead process. So now just set it to
null
after disposing and check for that.