MCPcopy Create free account
hub / github.com/tox-dev/filelock / raise_grouped_errors

Function raise_grouped_errors

src/filelock/_core/_errors.py:226–238  ·  view source on GitHub ↗
(
    message: str,
    first_error: BaseException,
    second_error: BaseException,
    *additional_errors: BaseException,
    marker: tuple[str, _MarkerValue] | None = None,
)

Source from the content-addressed store, hash-verified

224
225
226def raise_grouped_errors(
227 message: str,
228 first_error: BaseException,
229 second_error: BaseException,
230 *additional_errors: BaseException,
231 marker: tuple[str, _MarkerValue] | None = None,
232) -> NoReturn:
233 errors = (first_error, second_error, *additional_errors)
234 _detach_grouped_contexts(errors)
235 group: Final[BaseExceptionGroup[BaseException]] = BaseExceptionGroup(message, errors)
236 if marker is not None:
237 setattr(group, marker[0], marker[1])
238 raise group from None
239
240
241def _detach_grouped_contexts(errors: tuple[BaseException, ...]) -> None:

Calls 1

_detach_grouped_contextsFunction · 0.85