Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions src/ViewModels/SimulateViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,24 @@ async Task StartSimulation()
if (result.Success)
{
Status = _loc.T("Sim.Completed", result.Elapsed.TotalSeconds);
L($"Result: {(result.Success ? "PASS" : "FAIL")}");
foreach (var note in result.Notes) L($" Note: {note}");
var reportPath = await _report.GenerateAsync(Config, result, Config.OutputDirectory);
L(_loc.T("Sim.Report", reportPath));
}
else { Status = _loc.T("Sim.Failed", result.ErrorMessage ?? "unknown"); }
else
{
Status = _loc.T("Sim.Failed", result.ErrorMessage ?? "unknown");
}
L($"Result: {(result.Success ? "PASS" : "FAIL")}");
foreach (var note in result.Notes) L($" Note: {note}");
var reportPath = await _report.GenerateAsync(Config, result, Config.OutputDirectory);
L(_loc.T("Sim.Report", reportPath));
}
catch (Exception ex)
{
Status = $"Error: {ex.Message}";
L($"FATAL: {ex}");
var failResult = new SimulationResult { Success = false, ErrorMessage = ex.Message };
var reportPath = await _report.GenerateAsync(Config, failResult, Config.OutputDirectory);
L(_loc.T("Sim.Report", reportPath));
Comment on lines +112 to +117
Comment on lines +108 to +117
}
catch (Exception ex) { Status = $"Error: {ex.Message}"; L($"FATAL: {ex}"); }
finally { IsRunning = false; }
}

Expand Down