mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Making error messages consistent
This commit is contained in:
parent
075ff0304c
commit
7266fcc5ed
2 changed files with 5 additions and 4 deletions
|
|
@ -498,8 +498,9 @@ void DAGUniverse::legacy_assign_material(
|
|||
|
||||
// report failure for failed int conversion or missing material
|
||||
if (!found_by_id)
|
||||
fatal_error(fmt::format(
|
||||
"No material '{}' found for volume (cell) {}", mat_string, c->id_));
|
||||
fatal_error(
|
||||
fmt::format("Material with name/ID '{}' not found for volume (cell) {}",
|
||||
mat_string, c->id_));
|
||||
}
|
||||
|
||||
if (settings::verbosity >= 10) {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ def test_missing_material_id(model):
|
|||
model.materials = model.materials[:-1]
|
||||
with pytest.raises(RuntimeError) as exec_info:
|
||||
model.run()
|
||||
exp_error_msg = "Material with ID '41' not found for volume (cell) 3"
|
||||
exp_error_msg = "Material with name/ID '41' not found for volume (cell) 3"
|
||||
assert exp_error_msg in str(exec_info.value)
|
||||
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ def test_missing_material_name(model):
|
|||
model.materials = model.materials[1:]
|
||||
with pytest.raises(RuntimeError) as exec_info:
|
||||
model.run()
|
||||
exp_error_msg = "No material 'no-void fuel' found for volume (cell) 1"
|
||||
exp_error_msg = "Material with name/ID 'no-void fuel' not found for volume (cell) 1"
|
||||
assert exp_error_msg in str(exec_info.value)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue