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

Wrapper Exceptions accumulate modifications. #373

Open
DanFTRX opened this issue Jan 18, 2018 · 2 comments
Open

Wrapper Exceptions accumulate modifications. #373

DanFTRX opened this issue Jan 18, 2018 · 2 comments

Comments

@DanFTRX
Copy link

DanFTRX commented Jan 18, 2018

In Raygun4net4 when a wrapper exception is split up into its respective exceptions, it passes the same collection instances to each of the new messages:
https://github.com/MindscapeHQ/raygun4net/blob/master/Mindscape.Raygun4Net4/RaygunClient.cs#L440

The documentation for modifying messages suggests that we are able to modify these messages during the SendMessage event:
https://raygun.com/docs/languages/net/raygun.com#modify-cancel-message

But if we have a modifier, such as a tag that we append, the tags list gets modified for each and every exception in the AggregateException, but accumulating because they all share the same instance.

To summarize, the RaygunMessageBuilder needs to make copies of the lists/collections added to it otherwise AggregateExceptions and other exceptions that wrap multiple exceptions will accumulate modifications unnecessarily.

@QuantumNightmare
Copy link
Contributor

Hi DanFTRX,

Thanks for pointing this out. We'll take a look at this for a future release of Raygun4Net.

-Jason Fauchelle

@DanFTRX
Copy link
Author

DanFTRX commented Oct 22, 2018

Any word on this?

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

No branches or pull requests

2 participants