Skip to content

Commit

Permalink
better error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholaswogan committed May 30, 2024
1 parent baab3ab commit a2f89cd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/equilibrate_yaml.f90
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ subroutine unpack_speciesfile(root, filename, sp, err)
ind = findloc(sp%atoms_names,trim(key_value_pair%key), 1)
if (ind == 0) then
err = 'The atom "'// trim(key_value_pair%key)//'" in species "'// &
sp%r(j)%name//'" is not in the list of atoms.'
sp%r(j)%name//'" is not in the list of atoms: '
do i = 1,size(sp%atoms_names)
if (i == size(sp%atoms_names)) then
err = err//trim(sp%atoms_names(i))
else
err = err//trim(sp%atoms_names(i))//', '
endif
enddo
return
endif
key_value_pair =>key_value_pair%next
Expand Down

0 comments on commit a2f89cd

Please sign in to comment.