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

[NativeAOT] ArgumentNullException.ParamName is missing #73723

Closed
LakshanF opened this issue Aug 10, 2022 · 2 comments
Closed

[NativeAOT] ArgumentNullException.ParamName is missing #73723

LakshanF opened this issue Aug 10, 2022 · 2 comments
Assignees
Milestone

Comments

@LakshanF
Copy link
Member

The following code snippet does not have ParamName for the ArgumentNullException that is thrown in Native AOT

using System.ComponentModel;

var attribute = new InstallerTypeAttribute((string)null);
try
{
    var v1 = attribute.InstallerType;
}catch(ArgumentNullException ex)
{
    Console.WriteLine(ex.Message);
    Console.WriteLine(ex.ParamName);
}

.NET

<Value cannot be null. (Parameter 'typeName')>
<typeName>

NativeAOT

<Value cannot be null.>
<>
@LakshanF LakshanF added this to the 8.0.0 milestone Aug 10, 2022
@MichalStrehovsky
Copy link
Member

The fix for this is just about adding a nameof(typeName) as a parameter to this line:

@LakshanF LakshanF self-assigned this Aug 11, 2022
@LakshanF
Copy link
Member Author

Fixed with #73734

@ghost ghost locked as resolved and limited conversation to collaborators Sep 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

2 participants