Ejemplo n.º 1
0
    def _render_exception(self, exception):
        frames = extract_tb(exception.__traceback__)

        frame_html = []
        for frame in frames:
            frame_html.append(TRACEBACK_LINE_HTML.format(frame))

        return TRACEBACK_WRAPPER_INNER_HTML.format(
            exc_name=exception.__class__.__name__,
            exc_value=exception,
            frame_html=''.join(frame_html))
Ejemplo n.º 2
0
    def _render_exception(self, exception):
        frames = extract_tb(exception.__traceback__)

        frame_html = []
        for frame in frames:
            frame_html.append(TRACEBACK_LINE_HTML.format(frame))

        return TRACEBACK_WRAPPER_INNER_HTML.format(
            exc_name=exception.__class__.__name__,
            exc_value=exception,
            frame_html=''.join(frame_html))
Ejemplo n.º 3
0
    def _render_traceback_html(self, exception, request):
        exc_type, exc_value, tb = sys.exc_info()
        frames = extract_tb(tb)

        frame_html = []
        for frame in frames:
            frame_html.append(TRACEBACK_LINE_HTML.format(frame))

        return TRACEBACK_WRAPPER_HTML.format(style=TRACEBACK_STYLE,
                                             exc_name=exc_type.__name__,
                                             exc_value=exc_value,
                                             frame_html=''.join(frame_html),
                                             uri=request.url)