Skip to content

Commit

Permalink
log exception when creating connection object
Browse files Browse the repository at this point in the history
  • Loading branch information
BlenMiner committed Nov 27, 2023
1 parent 4ce4f48 commit 4e1d5a9
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions 3d-pixels-server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,21 @@ static async void DoMain(string[] args)

var dbPath = Path.Combine(dataPath, "pixels.sqlite");

Console.WriteLine($"Creating database connection at:");
var sqliteConnection = new SqliteConnection($"Data Source='{dbPath}'");
Console.WriteLine($"{dbPath}");
Console.WriteLine($"Creating database connection");

SqliteConnection sqliteConnection;

try
{
sqliteConnection = new SqliteConnection($"Data Source='{dbPath}'");
}
catch (Exception ex)
{
Console.WriteLine($"# Error creating connection object:");
Console.WriteLine(ex.Message);
return;
}


try
{
Expand Down

0 comments on commit 4e1d5a9

Please sign in to comment.