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

TwinagleException includes error code in message #388

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

bscherlein
Copy link
Contributor

@bscherlein bscherlein commented Sep 28, 2023

When a TwinagleException is used as a RuntimeException, the message should still show the errorCode because often this has the most important information encoded.
This came up for me because spec2's ExceptionMatcher only verifies equality of type and of message, but it might also be relevant in other contexts.

Wrt releasing and semantic versioning, I think in edge cases this change could break clients if they parse the message to decide what to do next and look for equality of the strings.

Co-authored-by: Christopher Taylor <[email protected]>
@bscherlein bscherlein force-pushed the TwinagleException-include-error-code-in-message branch from df0cdaf to 5c4989d Compare September 29, 2023 08:39
@bscherlein bscherlein marked this pull request as ready for review September 29, 2023 08:58
Copy link
Member

@ccmtaylor ccmtaylor left a comment

Choose a reason for hiding this comment

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

nice, thank you!

@ccmtaylor ccmtaylor merged commit 32e82ce into master Sep 29, 2023
1 check passed
@ccmtaylor ccmtaylor deleted the TwinagleException-include-error-code-in-message branch September 29, 2023 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants