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

Include RPC server stack trace in RemoteInvocationException.ToString() #395

Merged
merged 1 commit into from
Dec 4, 2019

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Dec 4, 2019

It isn't always possible to do, but when the server provides a CommonErrorData object, we certainly can do it.
I endeavored to copy the string format that .NET uses for its own exception formatting, including for inner exceptions.

Closes #369

@AArnott AArnott added this to the v2.3 milestone Dec 4, 2019
@AArnott AArnott force-pushed the fix369 branch 2 times, most recently from 75fea4e to 3d77261 Compare December 4, 2019 18:17
Copy link
Member Author

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

These two lines could be written as "if (this.DeserializedErrorData is CommonErrorData errorData)", couldn't they?

Yes, they can. I tried that syntax before and it didn't work at the time because I had a loop where errorData had to be typed as CommonErrorData?, but in my latest code it does work, so I've written.

It isn't always possible to do, but when the server provides a `CommonErrorData` object, we certainly can do it.
I endeavored to copy the string format that .NET uses for its own exception formatting, including for inner exceptions.

Closes microsoft#369
@codecov-io
Copy link

codecov-io commented Dec 4, 2019

Codecov Report

Merging #395 into master will decrease coverage by 0.58%.
The diff coverage is 4.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #395      +/-   ##
==========================================
- Coverage   90.94%   90.36%   -0.59%     
==========================================
  Files          47       47              
  Lines        3557     3581      +24     
==========================================
+ Hits         3235     3236       +1     
- Misses        322      345      +23
Impacted Files Coverage Δ
...eamJsonRpc/Exceptions/RemoteInvocationException.cs 21.05% <4.16%> (-36.1%) ⬇️
src/StreamJsonRpc/JsonRpc.cs 93.09% <0%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3cba133...989bf93. Read the comment docs.

@AArnott AArnott merged commit 47a1325 into microsoft:master Dec 4, 2019
@AArnott AArnott deleted the fix369 branch December 4, 2019 18:37
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.

RemoteInvocationException.ToString() return value should include remote callstack
4 participants