-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Client: Wrap synchronous exceptions #28919
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
211d31b
Client: Wrap synchronous exceptions
nik9000 d823914
Fixes from comments
nik9000 fdabee2
another space
nik9000 966bdde
More catch (
nik9000 17c10f0
Undo changes on files commit doesnt' touch
nik9000 888c6bd
Merge branch 'master' into rest_client_stack
nik9000 b5fa54c
Javadoc
nik9000 6b3e0b5
Merge branch 'master' into rest_client_stack
nik9000 990444a
WIP
nik9000 7212e84
Better words
nik9000 fa47ddb
Test for wrapping exception
nik9000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,6 +203,14 @@ public Response performRequest(String method, String endpoint, Map<String, Strin | |
* they previously failed (the more failures, the later they will be retried). In case of failures all of the alive nodes (or dead | ||
* nodes that deserve a retry) are retried until one responds or none of them does, in which case an {@link IOException} will be thrown. | ||
* | ||
* This method works by performing an asynchronous call and the waiting | ||
* for the result. If the asynchronous call throws and exception we wrap | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/and/an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! |
||
* it and rethrow it so that the stack trace attached to the exception | ||
* contains the call site. While we attempt to preserve the original | ||
* exception this isn't always possible and likely haven't covered all of | ||
* the cases. You can get the original exception from | ||
* {@link Exception#getCause()}. | ||
* | ||
* @param method the http method | ||
* @param endpoint the path of the request (without host and port) | ||
* @param params the query_string parameters | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
remove "the" ?
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.
++