def build_template_error_formatters():
 formatters = []
 def mako_html_data(exc_value):
  if isinstance(exc_value, (mako.exceptions.CompileException, mako.exceptions.SyntaxException)):
   return mako.exceptions.html_error_template().render(full=False, css=False)
  if (isinstance(exc_value, AttributeError) and exc_value.args[0].startswith("'Undefined' object has no attribute")):
   return mako.exceptions.html_error_template().render(full=False, css=False)
 formatters.append(mako_html_data)
 return formatters

def build_template_error_formatters ( ) : formatters = [ ] def mako_html_data ( exc_value ) : if isinstance ( exc_value , ( mako . exceptions . CompileException , mako . exceptions . SyntaxException ) ) : return mako . exceptions . html_error_template ( ) . render ( full = False , css = False ) if ( isinstance ( exc_value , AttributeError ) and exc_value . args [ 0 ] . startswith ( "'Undefined' object has no attribute" ) ) : return mako . exceptions . html_error_template ( ) . render ( full = False , css = False ) formatters . append ( mako_html_data ) return formatters
build a list of template error formatters for weberror .