alphagov/slimmer — pull request #3 by chrisroos (2012-07-09 14:17:00+00:00)
Title: Raise friendly error when template host cannot be resolved.

By default, Rummager will attempt to connect to static.dev.gov.uk for
its templates. If you're not using the standard hosts (*.dev.gov.uk)
to serve the apps then visiting your instance of Rummager will result
in the fairly opaque:

SocketError at /
getaddrinfo: nodename nor servname provided, or not known

This change to slimmer will catch the SocketError exception and raise a
more friendly Slimmer::CouldNotRetrieveTemplate error, which is what it
currently does when it can't connect to port 80. This makes it much
easier to diagnose these problems in client apps, e.g. Rummager.