Skip to content

Commit

Permalink
Make error message for unknown boundary name more helpful (trixi-fram…
Browse files Browse the repository at this point in the history
…ework#1762)

Co-authored-by: Daniel Doehring <[email protected]>
  • Loading branch information
efaulhaber and DanielDoehring authored Dec 6, 2023
1 parent 45e7dc2 commit 7a7ce48
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/solvers/dgsem_unstructured/sort_boundary_conditions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ function initialize!(boundary_types_container::UnstructuredSortedBoundaryTypes{N
for key in keys(boundary_dictionary)
if !(key in all_names)
println(stderr,
"ERROR: Key $(repr(key)) is not a valid boundary name")
"ERROR: Key $(repr(key)) is not a valid boundary name. " *
"Valid names are $all_names.")
MPI.Abort(mpi_comm(), 1)
end
end
Expand All @@ -67,7 +68,8 @@ function initialize!(boundary_types_container::UnstructuredSortedBoundaryTypes{N
else
for key in keys(boundary_dictionary)
if !(key in unique_names)
error("Key $(repr(key)) is not a valid boundary name")
error("Key $(repr(key)) is not a valid boundary name. " *
"Valid names are $unique_names.")
end
end
end
Expand Down

0 comments on commit 7a7ce48

Please sign in to comment.