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 (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul authored Feb 27, 2024
1 parent 9ecf496 commit c0ae5ce
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 c0ae5ce

Please sign in to comment.