with(traceback:)

Initializes a new exception with the given traceback.

Declaration

func with(
    traceback: Traceback?
) -> Exception

Parameters

Returns

A new exception with the traceback attached to it.

Discussion

Note

This doesn’t affect the __traceback__ attribute of the actual exception object.