@staticmethod<EOL><INDENT>def _capture_exceptions(callable: Callable[..., CaptureResult], *args, **kwargs) -> CaptureResult:<DEDENT>
try:<EOL><INDENT>return_value = callable(*args, **kwargs)<EOL>assert return_value.exception is None, "<STR_LIT>"<EOL>return CaptureResult(return_value=return_value.return_value, stdout=return_value.stdout,<EOL>stderr=return_value.stderr)<EOL><DEDENT>except BaseException as e:<EOL><INDENT>return CaptureResult(exception=e)<EOL><DEDENT>
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