MCPcopy Index your code
hub / github.com/RustPython/RustPython / html_error

Function html_error

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

Source from the content-addressed store, hash-verified

2658 return title, content
2659
2660 def html_error(url, exc):
2661 heading = html.heading(
2662 '<strong class="title">Error</strong>',
2663 )
2664 contents = '<br>'.join(html.escape(line) for line in
2665 format_exception_only(type(exc), exc))
2666 contents = heading + html.bigsection(url, 'error', contents)
2667 return "Error - %s" % url, contents
2668
2669 def get_html_page(url):
2670 """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