Skip to content

Commit

Permalink
Improved error message for "Missing skill or step out of reach" case …
Browse files Browse the repository at this point in the history
…by adding job.id (VROOM-Project#946)
  • Loading branch information
mebymyself committed Jul 13, 2023
1 parent e6a92c0 commit caedda4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Update polylineencoder to v2.0.1 (#931)
- Switch to C++20 (#851)
- Improved error messages for file-related IO errors (#553)
- Improved error message for "Missing skill or step out of reach" case by adding job.id (#946)

### Fixed

Expand Down
5 changes: 3 additions & 2 deletions src/algorithms/heuristics/heuristics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,9 @@ template <class T> T initial_routes(const Input& input) {
job_ranks.push_back(job_rank);

if (!input.vehicle_ok_with_job(v, job_rank)) {
throw InputException("Missing skill or step out of reach for vehicle " +
std::to_string(vehicle.id) + ".");
throw InputException("Missing skill or step out of reach for vehicle=" +
std::to_string(vehicle.id) + ", job=" +)
std::to_string(job.id) + ".";
}

assert(step.job_type.has_value());
Expand Down

0 comments on commit caedda4

Please sign in to comment.