Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better validation error messages #97

Merged
merged 2 commits into from Sep 22, 2017

Conversation

pipermerriam
Copy link
Member

What was wrong?

When a validation error occurred, it would often have a cryptic message such as:

"Value 28 is not less than or equal to 0"

It was really difficult to divine where this message originated from and what it was validating.

How was it fixed?

All of the validate_x functions now accept an optional title parameter. When provided, the corresponding message would then look something like this

validate_lte(..., title="Block Number")

"Block Number 28 is not less than or equal to 0"

Cute Animal Picture

baby-pig-1

@pipermerriam pipermerriam merged commit c103561 into master Sep 22, 2017
@pipermerriam pipermerriam deleted the piper/better-validation-messages branch September 22, 2017 23:39
pacrob pushed a commit to pacrob/py-evm that referenced this pull request Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant