Ticket #16770: better_operationalerror.diff
File better_operationalerror.diff, 782 bytes (added by , 13 years ago) |
---|
-
django/template/debug.py
3 3 from django.utils.html import escape 4 4 from django.utils.safestring import SafeData, EscapeData 5 5 from django.utils.formats import localize 6 from psycopg2 import OperationalError 7 6 8 7 9 class DebugLexer(Lexer): 8 10 def __init__(self, template_string, origin): … … 74 76 if not hasattr(e, 'source'): 75 77 e.source = node.source 76 78 raise 79 except OperationalError: 80 raise 77 81 except Exception, e: 78 82 from sys import exc_info 79 83 wrapped = TemplateSyntaxError(u'Caught %s while rendering: %s' %