hoek-boom
+ a few additions
Introduction
This library extends Hoek and exposes Boom.
Additional Features
On top of the already exposed Hoek module API.
assertBoom( condition, message, errorName )
var a = 1 b = 2; HoekBoom; // ABORT: a should equal b, throw boom error // other uses ...HoekBoom; // throws ErrorHoekBoom; // throws ErrorHoekBoom; // throws given error objectHoekBoom; // throws Boom.badRequest()HoekBoom; // throws Error('some message')HoekBoom; // throws Error('some message here for all ' + JSON.stringify({test: 'lolz'}))HoekBoom; // throws Error('some message')HoekBoom; // throws Boom.badRequest('check the docs')HoekBoom; // throws Boom.badRequest('check the docs', {username: 'johnsmith'})HoekBoom; // throws Boom.unauthorized('invalid password', 'sample', {username: 'johnsmith'})
Boom
var Boom = HoekBoomBoom; ;