fix errors during early startup not shown before exit
This commit is contained in:
parent
29d11a72c2
commit
20912724a0
|
@ -4,6 +4,7 @@ These changes have not been released yet.
|
||||||
|
|
||||||
* For players:
|
* For players:
|
||||||
* SMAPI now prevents invalid items from breaking menus on hover.
|
* SMAPI now prevents invalid items from breaking menus on hover.
|
||||||
|
* Fixed errors during early startup not shown before exit.
|
||||||
|
|
||||||
* For modders:
|
* For modders:
|
||||||
* `this.Monitor.Log` now defaults to the `Trace` log level instead of `Debug`.
|
* `this.Monitor.Log` now defaults to the `Trace` log level instead of `Debug`.
|
||||||
|
|
|
@ -29,12 +29,20 @@ namespace StardewModdingAPI
|
||||||
/// <summary>The main entry point which hooks into and launches the game.</summary>
|
/// <summary>The main entry point which hooks into and launches the game.</summary>
|
||||||
/// <param name="args">The command-line arguments.</param>
|
/// <param name="args">The command-line arguments.</param>
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
AppDomain.CurrentDomain.AssemblyResolve += Program.CurrentDomain_AssemblyResolve;
|
AppDomain.CurrentDomain.AssemblyResolve += Program.CurrentDomain_AssemblyResolve;
|
||||||
Program.AssertGamePresent();
|
Program.AssertGamePresent();
|
||||||
Program.AssertGameVersion();
|
Program.AssertGameVersion();
|
||||||
Program.Start(args);
|
Program.Start(args);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"SMAPI failed to initialise: {ex}");
|
||||||
|
Program.PressAnyKeyToExit(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
|
|
Loading…
Reference in New Issue