split_recoverable

caqtus.types.recoverable_exceptions.split_recoverable(
exception: BaseException,
) tuple[BaseException, BaseException] | tuple[None, BaseException] | tuple[BaseException, None]

Split an exception into recoverable and non-recoverable parts.

This function is mainly meant to split exception groups.

Returns:

  • The recoverable part of the exception, or None if there is no recoverable part.

  • The non-recoverable part of the exception, or None if there is no non-recoverable part.

Return type:

A tuple of two elements