Skip to content

CallInfo.from_call cuts off traceback for exceptions #6081

@blueyed

Description

@blueyed

Code:

try:
result = func()
except: # noqa
excinfo = ExceptionInfo.from_current()
if reraise is not None and excinfo.errisinstance(reraise):
raise
result = None
stop = time()
return cls(start=start, stop=stop, when=when, result=result, excinfo=excinfo)

It would be good if exceptions being caught/handled there would still have the full traceback.

With Python 3.7 at least we could use types.TracebackType, and create entries based on the frame stack there then.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: reportingrelated to terminal output and user-facing messages and errorstype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions