Serialize `self.exc` into a data dictionary representing it.

def serialize(exc):
    """ Serialize `self.exc` into a data dictionary representing it.
    """

    return {
        'exc_type': type(exc).__name__,
        'exc_path': get_module_path(type(exc)),
        'exc_args': list(map(safe_for_serialization, exc.args)),
        'value': safe_for_serialization(exc),
    }