mirror of
https://github.com/GittyMac/A1Emu.git
synced 2026-03-21 17:44:51 -05:00
fix: Updated .NET and added some startup error handling
trying to get back in the groove
This commit is contained in:
parent
705802f49d
commit
1a3c64ae58
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@ class Program
|
|||
|
||||
if (!File.Exists(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "/config"))
|
||||
{
|
||||
Console.WriteLine("[ERROR] A1Emu did not find a config file in the application's directory.");
|
||||
Console.WriteLine("[ERROR] A1Emu did not find a config file in the application's directory. Please add one and relaunch.");
|
||||
System.Environment.Exit(1);
|
||||
}
|
||||
|
||||
try
|
||||
|
|
@ -123,6 +124,17 @@ class Program
|
|||
|
||||
var con = new MySqlConnection(sqServer);
|
||||
|
||||
try
|
||||
{
|
||||
con.Open();
|
||||
con.Close();
|
||||
}
|
||||
catch (MySqlException ex)
|
||||
{
|
||||
Console.WriteLine("[ERROR] A1Emu could not connect to the SQL server. Exception: " + ex.Message);
|
||||
System.Environment.Exit(1);
|
||||
}
|
||||
|
||||
//TODO - Generate a SQL DB. (Will probably be an external script or a manual README instruction)
|
||||
|
||||
//TODO - Truncate all the multiplayer tables whenever they get added.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user