MCPcopy Index your code
hub / github.com/webpy/webpy / emailerrors_internal

Function emailerrors_internal

web/debugerror.py:343–361  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

341 from_address = from_address or to_address
342
343 def emailerrors_internal():
344 error = olderror()
345 tb = sys.exc_info()
346 error_name = tb[0]
347 error_value = tb[1]
348 tb_txt = "".join(traceback.format_exception(*tb))
349 path = web.ctx.path
350 request = web.ctx.method + " " + web.ctx.home + web.ctx.fullpath
351
352 message = f"\n{request}\n\n{tb_txt}\n\n"
353
354 sendmail(
355 "your buggy site <%s>" % from_address,
356 "the bugfixer <%s>" % to_address,
357 "bug: {error_name}: {error_value} ({path})".format(**locals()),
358 message,
359 attachments=[dict(filename="bug.html", content=safestr(djangoerror()))],
360 )
361 return error
362
363 return emailerrors_internal
364

Callers

nothing calls this directly

Calls 4

sendmailFunction · 0.85
safestrFunction · 0.85
djangoerrorFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected