Catching TemplateDoesNotExist exception rather than the more vague Exception exception.