Skip to content

Commit

Permalink
improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed Mar 14, 2024
1 parent 096c5a2 commit 1070a14
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/AtomSelection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,15 @@ function AtomSelection(
# Check if all group atoms indices belong to the current AtomSelection
for inds in group_atom_indices
if any(!(i in indices) for i in inds)
throw(ArgumentError("Some group atom indices not found in the the current AtomSelection atomic indices."))
throw(ArgumentError("""\n
Group atom indices not found in the the current AtomSelection main atomic indices.
In other words, the group_atom_indices vector contains atom indices that are not present
in the main selection of the AtomSelection. All groups *must* be strictly a
subset of the main selection. Please check your group definitions.
"""))
end
end
if isempty(group_names)
Expand Down

0 comments on commit 1070a14

Please sign in to comment.