Skip to content

Commit 3300080

Browse files
Made error message slightly more verbose
1 parent 02ce122 commit 3300080

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ccinput/calculation.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,14 @@ def verify_charge_mult(self):
149149
odd_m = self.multiplicity % 2
150150

151151
if odd_e == odd_m:
152+
if self.file:
153+
extra_detail = f" (file={self.file})"
154+
else:
155+
extra_detail = ""
156+
152157
raise ImpossibleCalculation(
153158
f"This combination of charge ({self.charge}) "
154-
+ f"and multiplicity ({self.multiplicity}) is impossible"
159+
+ f"and multiplicity ({self.multiplicity}) is impossible{extra_detail}"
155160
)
156161

157162

0 commit comments

Comments
 (0)