puppetlabs/puppet-dashboard — pull request #83 by adrienthebo (2012-02-08 04:08:31+00:00)
Title: (#12476) Add context to install.rake exceptions

Tasks inside lib/tasks/install.rake could throw SocketErrors when
attempting to contact the CA server that did not give sufficient context
as to what connection was failing. This could let to the ultimately
unhelpful state of

(in /opt/puppet/share/puppet-dashboard)
rake aborted!
getaddrinfo: Name or service not known

This adds exception handling that will add the relevant context to the
exception and re-raise it. In this case, we would get

(in /opt/puppet/share/puppet-dashboard)
rake aborted!
Unable to contact ca_server example.unreachable.foo: getaddrinfo: Name or service not known

So when the task fails, there's a clear explanation for what exactly is
failing.