Skip to content

Commit

Permalink
Made error message slightly more verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelRobidas committed Jun 4, 2024
1 parent 02ce122 commit 3300080
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ccinput/calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,14 @@ def verify_charge_mult(self):
odd_m = self.multiplicity % 2

if odd_e == odd_m:
if self.file:
extra_detail = f" (file={self.file})"
else:
extra_detail = ""

raise ImpossibleCalculation(
f"This combination of charge ({self.charge}) "
+ f"and multiplicity ({self.multiplicity}) is impossible"
+ f"and multiplicity ({self.multiplicity}) is impossible{extra_detail}"
)


Expand Down

0 comments on commit 3300080

Please sign in to comment.