MCPcopy Index your code
hub / github.com/datacamp/pythonwhat / get_error

Function get_error

pythonwhat/tasks.py:343–345  ·  view source on GitHub ↗
(f, *args, **kwargs)

Source from the content-addressed store, hash-verified

341
342@process_task
343def get_error(f, *args, **kwargs):
344 res = f(*args, **kwargs)
345 return (res, str(res)) if isinstance(res, Exception) else (None, res)
346
347
348# General tasks to eval or exec code, with decorated counterparts -------------

Callers

nothing calls this directly

Calls 1

fFunction · 0.85

Tested by

no test coverage detected