mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Provide error message if a cell path can't be determined (#2812)
This commit is contained in:
parent
f5900293fa
commit
411656668f
1 changed files with 9 additions and 0 deletions
|
|
@ -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_ << "->";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue