Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Make CasADiOpti throw TrajectoryGenerationException
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul committed Feb 27, 2024
1 parent 9ecf496 commit eace84f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/optimization/CasADiOpti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
#include "optimization/CasADiOpti.h"

#include <casadi/casadi.hpp>
#include <casadi/core/exception.hpp>
#include <casadi/core/generic_matrix.hpp>
#include <casadi/core/mx.hpp>

#include "DebugOptions.h"
#include "optimization/Cancellation.h"
#include "optimization/CasADiIterCallback.h"
#include "trajopt/TrajectoryGenerationException.h"

namespace trajopt {

Expand Down Expand Up @@ -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"};
}
}

Expand Down

0 comments on commit eace84f

Please sign in to comment.