-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix exception stack pretty printing in the presence of missing dependencies #111476
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
Conversation
|
Found in #111311 (comment) |
|
Tagging subscribers to this area: @tommcdon |
| // Getting the attributes has failed, return null. One of the reasons | ||
| // can be that the member has attributes defined in an assembly that is missing. | ||
| return []; | ||
| return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caller casts this to StateMachineAttribute[]. Casting empty Attribute[] to StateMachineAttribute[] was guaranteed to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackTrace.cs:421
- The change to return null instead of an empty array should be covered by tests to ensure that the new behavior is correctly handled.
private static Attribute[]? GetCustomAttributesSafe(MemberInfo memberInfo, Type attributeType, bool inherit)
|
Oops, thanks! |
ViktorHofer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
No description provided.