Skip to content

Add StatusProto.toStatusException overload to accept Throwable#11083

Merged
larry-safran merged 4 commits into
grpc:masterfrom
rtadepalli:propagate-cause
Apr 25, 2024
Merged

Add StatusProto.toStatusException overload to accept Throwable#11083
larry-safran merged 4 commits into
grpc:masterfrom
rtadepalli:propagate-cause

Conversation

@rtadepalli

Copy link
Copy Markdown
Contributor

Fixes #10900

@linux-foundation-easycla

linux-foundation-easycla Bot commented Apr 7, 2024

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

@rtadepalli

Copy link
Copy Markdown
Contributor Author

cc @ejona86

Comment thread protobuf/src/test/java/io/grpc/protobuf/StatusProtoTest.java Outdated
Comment thread protobuf/src/main/java/io/grpc/protobuf/StatusProto.java
@rtadepalli rtadepalli requested a review from ejona86 April 16, 2024 03:22
Comment thread protobuf/src/test/java/io/grpc/protobuf/StatusProtoTest.java Outdated

@Test
public void toStatusExceptionWithMetadataAndCause_shouldCaptureCause() {
RuntimeException exc = new RuntimeException("This is a test exception.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

probably rename exc -> cause

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, ex, exception, cause, etc would be more common, but we can live with this.

@ejona86 ejona86 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Apr 16, 2024
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Apr 16, 2024
@ejona86 ejona86 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Apr 24, 2024
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Apr 24, 2024
@ejona86 ejona86 requested a review from larry-safran April 24, 2024 16:18
@larry-safran larry-safran merged commit 5c9b492 into grpc:master Apr 25, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to propagate cause when using StatusProto.toStatusException

5 participants