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
Return error during plugin registration for invalid options. #49
Crumb was throwing an exception for invalid options rather than returning an error to the registration function callback (http://hapijs.com/api#serverregisterplugins-options-callback).
This PR changes the behaviour to return an error to the registration function callback. I'm not sure what the preferred behaviour is - I noticed that the lout plugin returns an error (rather than throwing - https://github.com/hapijs/lout/blob/master/lib/index.js#L43) - this change mimics that behaviour.