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

Add logging in Exceptions.throwIf[Jvm]Fatal, add isFatal methods #3122

Merged
merged 7 commits into from Aug 1, 2022

Conversation

simonbasle
Copy link
Member

This commit improves the discoverability of exceptions that are "fatal"
to Reactor by:

  • adding Exceptions.isFatal and Exceptions.isJvmFatal methods
  • adding logging to Exceptions.throwIfFatal and
    Exceptions.throwIfJvmFatal just before a fatal exception is thrown

This should at least help pinpointing such occurrences from the logs,
in cases where the thrown exception bubble all the way up the stack of
a thread with no uncaughtExceptionHandler for example.

Fixes #3111.

@simonbasle simonbasle requested a review from a team as a code owner July 21, 2022 15:50
@simonbasle simonbasle added this to the 3.4.22 milestone Jul 21, 2022
@simonbasle simonbasle added the type/enhancement A general enhancement label Jul 21, 2022
@simonbasle simonbasle self-assigned this Jul 21, 2022
@simonbasle
Copy link
Member Author

cc @elefeint

@simonbasle
Copy link
Member Author

note: the tests that assert logs could benefit from test features added in #3123

@simonbasle simonbasle marked this pull request as draft July 22, 2022 15:45
This commit improves the discoverability of exceptions that are "fatal"
to Reactor by:
 - adding `Exceptions.isFatal` and `Exceptions.isJvmFatal` methods
 - adding logging to `Exceptions.throwIfFatal` and
 `Exceptions.throwIfJvmFatal` just before a fatal exception is thrown

This should at least help pinpointing such occurrences from the logs,
in cases where the thrown exception bubble all the way up the stack of
a thread with no uncaughtExceptionHandler for example.

Fixes #3111.
@simonbasle
Copy link
Member Author

rebased on top of 3.4.x since #3123 has now been merged. will also adapt the throwIfFatal test to make use of new JUnit5 extension

@simonbasle simonbasle marked this pull request as ready for review August 1, 2022 14:26
@simonbasle simonbasle merged commit 50bb983 into 3.4.x Aug 1, 2022
@reactorbot
Copy link

@simonbasle this PR seems to have been merged on a maintenance branch, please ensure the change is merge-forwarded to intermediate maintenance branches and up to main 🙇

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

Successfully merging this pull request may close these issues.

Exceptions.throwIfFatal / throwIfJvmFatal should log fatal exceptions
4 participants