add some more logs

This commit is contained in:
Florian Stinglmayr 2022-01-06 16:40:55 +01:00
parent 8d51a00d57
commit 9db0b5d9cc

View File

@ -127,14 +127,17 @@ namespace EliteBGS {
}
private void ParseJournal_Click(object sender, RoutedEventArgs e) {
journal.Open(); // Load all files
var start = startdate.SelectedDate ?? DateTime.Now;
var end = startdate.SelectedDate ?? DateTime.Now;
report.Scan(journal, start, end);
RefreshObjectives();
try {
journal.Open(); // Load all files
var start = startdate.SelectedDate ?? DateTime.Now;
var end = startdate.SelectedDate ?? DateTime.Now;
report.Scan(journal, start, end);
RefreshObjectives();
} catch (Exception exception) {
Log("Something went terribly wrong while parsing the E:D player journal.");
Log("Please send this to CMDR Hekateh:");
Log(exception.ToString());
}
}
private void AddObjective() {
@ -159,10 +162,16 @@ namespace EliteBGS {
}
private void GenerateDiscord_Click(object sender, RoutedEventArgs e) {
IDiscordLogGenerator discord = LogType.SelectedItem as IDiscordLogGenerator;
string report = discord.GenerateDiscordLog(Report);
try {
IDiscordLogGenerator discord = LogType.SelectedItem as IDiscordLogGenerator;
string report = discord.GenerateDiscordLog(Report);
DiscordLog.Text = report;
DiscordLog.Text = report;
} catch (Exception e) {
Log("Something went terribly wrong while generating the Discord log.");
Log("Please send this to CMDR Hekateh:");
Log(e.ToString());
}
}
private void RemoveCurrentObjective() {
@ -230,7 +239,7 @@ namespace EliteBGS {
int system_id = systems_db.ToId(sys);
station.Provider = new StationSuggestionProvider(stations_db, system_id);
} catch (Exception exc) {
Log(exc.Message);
Log(exc.ToString());
}
}