diff --git a/src/optimization/CasADiOpti.cpp b/src/optimization/CasADiOpti.cpp index cb1bc6e3..1cc31766 100644 --- a/src/optimization/CasADiOpti.cpp +++ b/src/optimization/CasADiOpti.cpp @@ -3,13 +3,11 @@ #include "optimization/CasADiOpti.h" #include -#include -#include -#include #include "DebugOptions.h" #include "optimization/Cancellation.h" #include "optimization/CasADiIterCallback.h" +#include "trajopt/TrajectoryGenerationException.h" namespace trajopt { @@ -56,7 +54,7 @@ double CasADiOpti::SolutionValue(const casadi::MX& expression) const { return 0.0; } } else { - throw std::runtime_error("Solution not generated properly"); + throw TrajectoryGenerationException{"Solution not generated properly"}; } }