Resolve "ASCII export and import for Git" #83

Merged
thorsten merged 30 commits from 48-ascii-export-and-import-for-git into main 2023-02-12 12:55:07 +00:00
Showing only changes of commit ce5f2ae401 - Show all commits

View File

@ -47,11 +47,16 @@ internal static class Program
{ {
serviceCollection.ImportDataAndAddDatabase(loader.Result.DataFile).ConfigureAwait(false).GetAwaiter().GetResult(); serviceCollection.ImportDataAndAddDatabase(loader.Result.DataFile).ConfigureAwait(false).GetAwaiter().GetResult();
} }
catch (JsonException) catch (JsonException e)
{ {
MessageBox.Show($"The JSON file '{loader.Result.DataFile}' is invalid and cannot be imported.", "Invalid JSON file", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show($"The JSON file '{loader.Result.DataFile}' is invalid and cannot be imported: {e.Message}", "Invalid JSON file", MessageBoxButtons.OK, MessageBoxIcon.Error);
Environment.Exit(100); Environment.Exit(100);
} }
catch(Exception e)
{
MessageBox.Show($"An error occurred while importing the JSON file '{loader.Result.DataFile}': {e.Message}", "Error while importing JSON file", MessageBoxButtons.OK, MessageBoxIcon.Error);
Environment.Exit(101);
}
} }
}); });