Skip to content

Commit

Permalink
Provide error message if a cell path can't be determined (#2812)
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise authored Dec 27, 2023
1 parent f590029 commit 4116566
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/geometry_aux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,15 @@ std::string distribcell_path_inner(int32_t target_cell, int32_t map,
}
}

// if we get through the loop without finding an appropriate entry, throw
// an error
if (cell_it == search_univ.cells_.crend()) {
fatal_error(
fmt::format("Failed to generate a text label for distribcell with ID {}."
"The current label is: '{}'",
model::cells[target_cell]->id_, path.str()));
}

// Add the cell to the path string.
Cell& c = *model::cells[*cell_it];
path << "c" << c.id_ << "->";
Expand Down

0 comments on commit 4116566

Please sign in to comment.