puppetlabs/trapperkeeper-webserver-jetty9 — pull request #81 by fpringvaldsen (2014-09-11 18:37:08+00:00)
Title: (TK-54) Fix multiple default servers error message

Fix multiple default servers error message to be something
readable.

TK-54 specifically mentions that the error message being caused by `schema/either` was unreadable. The validation that ensures that only one default server is specified had already been moved to `schema/pred`, but the error message was still confusing and difficult to read, so I did some explicit validation so I could throw a more readable `IllegalArgumentException`.

I did this in a `validate-config` function in the `jetty9-config` namespace so that there's a function where we can do any necessary validation that we want to happen before the schema validation (in case we want to throw more readable error messages than those thrown by schema) without cluttering up the `init` service function.