Captures exceptions, adding them to the captured result, opposed to raising them.
        :param callable: the callable to wrap
        :param args: positional arguments passed to the callable
        :param kwargs: keyword arguments passed to the callable
        :return: the captured result

def _capture_exceptions(callable: Callable[..., CaptureResult], *args, **kwargs) -> CaptureResult:
        """
        Captures exceptions, adding them to the captured result, opposed to raising them.
        :param callable: the callable to wrap
        :param args: positional arguments passed to the callable
        :param kwargs: keyword arguments passed to the callable
        :return: the captured result
        """
        try:
            return_value = callable(*args, **kwargs)
            assert return_value.exception is None, "exception appears to have already been captured"
            return CaptureResult(return_value=return_value.return_value, stdout=return_value.stdout,
                                 stderr=return_value.stderr)
        except BaseException as e:
            return CaptureResult(exception=e)