Visitar URL original
Improve handling of `Error`s by stIncMale · Pull Request #2038 · mongodb/mongo-java-driver · GitHub
Skip to content

Improve handling of Errors - #2038

Merged
stIncMale merged 2 commits into
mongodb:mainfrom
stIncMale:JAVA-6110
Oct 8, 2026
Merged

stIncMale merged 2 commits into
mongodb:mainfrom
stIncMale:JAVA-6110

Conversation

@stIncMale

@stIncMale stIncMale commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Introduced ExceptionUtils.rethrowIfError/mapUnlessError, inspired by InternalStreamConnection.rethrowIfError/translateReadFailure, to facilitate handling Errors.

Please read the description of JAVA-6109 (this ticket is referred to by the description of JAVA-6110), which explains why throwing non-Exceptions even from pooled threads should now be OK (TL;DR: MongoThreadPoolExecutor/MongoScheduledThreadPoolExecutor).

The test failures look not worse than those in main.

AI usage

Claude (Opus (1M context), xhigh effort) was thoroughly used to review the changes, and was extremely helpful.

No changes were generated with AI.

JAVA-6110

@stIncMale
stIncMale requested review from rozza and removed request for strogiyotec August 14, 2026 03:23
@stIncMale
stIncMale marked this pull request as ready for review August 14, 2026 03:25
@stIncMale
stIncMale requested a review from a team as a code owner August 14, 2026 03:25
@codeowners-service-app

Copy link
Copy Markdown

Assigned strogiyotec for team dbx-java because rozza is out of office.

@stIncMale
stIncMale removed the request for review from rozza August 18, 2026 15:09
@stIncMale
stIncMale marked this pull request as draft October 5, 2026 19:14
@stIncMale
stIncMale marked this pull request as ready for review October 5, 2026 21:29

@strogiyotec strogiyotec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@stIncMale
stIncMale merged commit cab0bce into mongodb:main Oct 8, 2026
31 of 58 checks passed
@stIncMale
stIncMale deleted the JAVA-6110 branch October 8, 2026 20:37
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.

2 participants