Skip to content

Commit

Permalink
Improve an error message
Browse files Browse the repository at this point in the history
Knowing what erroneous value was passed will make debugging easier.
  • Loading branch information
jvoisin authored and msrb committed Apr 21, 2024
1 parent 2761d4f commit 1f5a54f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyfaf/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def check(self, obj) -> None:
type(obj).__name__))

if self.allowed and obj not in self.allowed:
raise CheckError("Only the following values are allowed: {0}"
.format(", ".join(self.allowed)))
raise CheckError("Got {0}, but only the following values are allowed: {1}"
.format(obj, ", ".join(self.allowed)))


class IntChecker(Checker):
Expand Down

0 comments on commit 1f5a54f

Please sign in to comment.