traceback(from:)

Computes a traceback from an exception.

Declaration

static func traceback(
    from exceptionObject: Object
) throws -> Traceback?

Parameters

  • exceptionObject: The actual exception object, which must contain a __traceback__ attribute.

Throws

An error occurred while parsing the traceback.

Returns

A serialized Traceback value.