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

Hoek.assert - throw error that is passed in as message #116

Closed
ryanwilliamquinn opened this issue Dec 10, 2014 · 1 comment
Closed

Hoek.assert - throw error that is passed in as message #116

ryanwilliamquinn opened this issue Dec 10, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@ryanwilliamquinn
Copy link
Contributor

@ryanwilliamquinn ryanwilliamquinn commented Dec 10, 2014

If a single error is passed in as the message to a hoek.assert(condition, msg) call, it should just throw that error. That would let us do stuff like:

hoek.assert(condition, Boom.badRequest('bad, bad request'));

and have the Boom error thrown, instead of a generic Error with 'bad, bad request' as its message, which is the current behavior if you do that.

@nlf

This comment has been minimized.

Copy link
Member

@nlf nlf commented Jan 5, 2015

Closed via #117

@nlf nlf closed this Jan 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.