MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / html_error

Function html_error

tools/python-3.11.9-amd64/Lib/pydoc.py:2708–2715  ·  view source on GitHub ↗
(url, exc)

Source from the content-addressed store, hash-verified

2706 return title, content
2707
2708 def html_error(url, exc):
2709 heading = html.heading(
2710 '<strong class="title">Error</strong>',
2711 )
2712 contents = '<br>'.join(html.escape(line) for line in
2713 format_exception_only(type(exc), exc))
2714 contents = heading + html.bigsection(url, 'error', contents)
2715 return "Error - %s" % url, contents
2716
2717 def get_html_page(url):
2718 """Generate an HTML page for url."""

Callers 1

get_html_pageFunction · 0.85

Calls 6

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

Tested by

no test coverage detected