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

Make CasADiOpti throw TrajectoryGenerationException #110

Merged
merged 1 commit into from
Feb 27, 2024
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
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
Loading