MCPcopy Index your code
hub / github.com/python/cpython / html_error

Function html_error

Lib/pydoc.py:2612–2619  ·  view source on GitHub ↗
(url, exc)

Source from the content-addressed store, hash-verified

2610 return title, content
2611
2612 def html_error(url, exc):
2613 heading = html.heading(
2614 '<strong class="title">Error</strong>',
2615 )
2616 contents = '<br>'.join(html.escape(line) for line in
2617 format_exception_only(type(exc), exc))
2618 contents = heading + html.bigsection(url, 'error', contents)
2619 return "Error - %s" % url, contents
2620
2621 def get_html_page(url):
2622 """Generate an HTML page for url."""

Callers 1

get_html_pageFunction · 0.85

Calls 5

format_exception_onlyFunction · 0.90
escapeMethod · 0.80
bigsectionMethod · 0.80
headingMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…