Skip to content

Commit

Permalink
better error message for converged failure
Browse files Browse the repository at this point in the history
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
  • Loading branch information
lamont-granquist committed May 31, 2023
1 parent 1547d2b commit 1f961fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MechJeb2/MechJebLib/PVG/Ascent.cs
Expand Up @@ -95,6 +95,9 @@ private Optimizer ConvergedOptimization(Optimizer.OptimizerBuilder builder, Solu
pvg.Bootstrap(solution);
pvg.Run();

if (!pvg.Success())
throw new Exception("converged optimizer failed");

using Solution solution2 = pvg.GetSolution();

(V3 rf, V3 vf) = solution2.TerminalStateVectors();
Expand Down

0 comments on commit 1f961fe

Please sign in to comment.