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

WW-5414 Always call afterInvocation even in case of exception #932

Merged
merged 1 commit into from
May 14, 2024

Conversation

lukaszlenart
Copy link
Member

Close WW-5414

try {
afterInvocation();
} catch (Exception ex) {
exception = ex;
Copy link
Member

Choose a reason for hiding this comment

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

Hmm what if beforeInvocation() already threw an exception, do we want to overwrite that?

Copy link
Member Author

@lukaszlenart lukaszlenart May 11, 2024

Choose a reason for hiding this comment

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

Yeah, I know, I thought about adding additional afterException and maybe beforeException fields to keep this information

Copy link
Member

Choose a reason for hiding this comment

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

If we're only going to record one, the first one is probably more relevant - I'll let you make the call

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, let's keep it simple, I will set exception only if wasn't already set

@asfgit asfgit force-pushed the feature/WW-5414-after branch from 32f9b68 to 7c271f6 Compare May 11, 2024 08:11
@asfgit asfgit force-pushed the feature/WW-5414-after branch from 7c271f6 to 4dfbe09 Compare May 11, 2024 08:25
Copy link

@lukaszlenart lukaszlenart merged commit d147543 into master May 14, 2024
9 checks passed
@lukaszlenart lukaszlenart deleted the feature/WW-5414-after branch May 14, 2024 17:55
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