Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Hoek.assert - throw error that is passed in as message #116
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.