-
Notifications
You must be signed in to change notification settings - Fork 69
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
Don't ignore exceptions from tasks #849
Don't ignore exceptions from tasks #849
Conversation
89486ce
to
5dfbde5
Compare
Closes keycloak#847 Signed-off-by: Alexander Schwartz <[email protected]>
5dfbde5
to
92f5089
Compare
@kami619 - you've been involved in the original issue, maybe you could review this PR? |
} | ||
} | ||
if (!failures.isEmpty()) { | ||
RuntimeException ex = new RuntimeException("Some futures failed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be possible to log more information about the type of failure which could help with the debug or would it log anyways ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code creates a Runtime Exception which then has a list of one or more suppressed exceptions. All of the suppressed exceptions will be logged to together with the message "Some futures failed".
The the following line for where the suppressed exceptions are added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change. Let's see what is happening there tomorrow.
According the the JavaDoc a future is also done when it failed. The current code will only show exceptions if a task that the code is waiting for is failing with an exception. Any other task that failed in the meantime is silently ignored.
Closes #847