Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid self-suppression for exceptions #2211

Merged
merged 3 commits into from
May 11, 2022

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

In case a processing function re-throws the original exception, we risk
to face IllegalArgumentException("Self-suppression not permitted) when
operator adds a re-thrown exception as suppressed.

Modifications:

  • Add utility that verifies the suppressed exception is not the same as
    the original one;

Result:

No IllegalArgumentException("Self-suppression not permitted).

Motivation:

In case a processing function re-throws the original exception, we risk
to face `IllegalArgumentException("Self-suppression not permitted)` when
operator adds a re-thrown exception as suppressed.

Modifications:

- Add utility that verifies the suppressed exception is not the same as
the original one;

Result:

No `IllegalArgumentException("Self-suppression not permitted)`.
@idelpivnitskiy idelpivnitskiy merged commit 3d26046 into apple:main May 11, 2022
@idelpivnitskiy idelpivnitskiy deleted the addSuppressed branch May 11, 2022 22:10
Copy link
Member

@Scottmitch Scottmitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

late lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants