(#7269) Better error reporting for bad render formats.
Previously we would try and send nil to a class to render an unsupported
format, which was bad. Worse, we would only discover this *after* the fact,
when we tried to render, so the entire action had run and the result was lost
to the world.
Instead, validate the parameter early and fail during option parsing. This
has less nice error reporting than we can get handling it later[1], but it
gets us a much better overall set of behaviour.
[1] puppet/application.rb will print and exit, rather than raising, when the
option handler fails; this will improve when we unify face and application options properly.
Reviewed-By: Max Martin <max@puppetlabs.com>