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

Throw instances of AssertionError on asserts #220

merged 1 commit into from Nov 3, 2017


Copy link

kanongil commented Nov 2, 2017

This allows try/catch clauses to detect these errors, and handle them separately. Most importantly, it can be handled by

Note that this changes the property, and the associated toString() output:

Error: My message


AssertionError [ERR_ASSERTION]: My message
@hueniverse hueniverse self-assigned this Nov 2, 2017
@hueniverse hueniverse added the feature label Nov 2, 2017
@hueniverse hueniverse added this to the 5.0.2 milestone Nov 2, 2017
@hueniverse hueniverse merged commit 3c80a87 into hapijs:master Nov 3, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.