Catch exceptions when generating template context for plain views.