Skip to content

Commit

Permalink
[#897] Better error msg for _class02_save2stp.py when file header is …
Browse files Browse the repository at this point in the history
…wrong
  • Loading branch information
dvezinet committed Jan 26, 2024
1 parent c45857a commit ea131e4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tofu/data/_class02_save2stp.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,11 @@ def _extract(
ln = [ss for ss in header[1:].strip().split(' ')]
if len(ln) != 2:
msg = (
"Header format os non-conform!\n"
"\t- file: {pfe_in}\n"
"\t- header: {header}\n"
"Header format is non-conform (use spaces in header)!\n"
f"\t- file: {pfe_in}\n"
f"\t- header: {header}\n"
"Expected:\n"
"# nlos npts\n(hastag then 2 integers separated by spaces)"
)
raise Exception(msg)

Expand Down

0 comments on commit ea131e4

Please sign in to comment.