#NEWLINE# def _render_error( template , context , error ) : #NEWLINE# #INDENT# if template . error_handler : #NEWLINE# #INDENT# result = template . error_handler ( context , error ) #NEWLINE# if ( not result ) : #NEWLINE# #INDENT# raise error #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# error_template = exceptions . html_error_template ( ) #NEWLINE# if context . _outputting_as_unicode : #NEWLINE# #INDENT# context . _buffer_stack [ : ] = [ util . FastEncodingBuffer ( as_unicode = True ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# context . _buffer_stack [ : ] = [ util . FastEncodingBuffer ( error_template . output_encoding , error_template . encoding_errors ) ] #NEWLINE# #UNINDENT# context . _set_with_template ( error_template ) #NEWLINE# error_template . render_context ( context , error = error )