Skip to content

Commit

Permalink
Fix more compile errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis authored Feb 6, 2025
1 parent b27ac49 commit 87cf79d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ public static Exception CreateBadImageFormatException(ExceptionStringID id)

public static Exception CreateTypeLoadException(ExceptionStringID id, string typeName, string moduleName)
{
return new TypeLoadException(SR.Format(GetFormatString(id), typeName, moduleName), typeName);
return new TypeLoadException(SR.Format(GetFormatString(id), typeName, moduleName)) { TypeName = typeName };
}

public static Exception CreateTypeLoadException(ExceptionStringID id, string typeName, string moduleName, string messageArg)
{
return new TypeLoadException(SR.Format(GetFormatString(id), typeName, moduleName, messageArg), typeName);
return new TypeLoadException(SR.Format(GetFormatString(id), typeName, moduleName, messageArg)) { TypeName = typeName };
}

public static Exception CreateMissingFieldException(ExceptionStringID id, string fieldName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static MethodInfo FilterAccessor(this MethodInfo accessor, bool nonPublic
public static TypeLoadException CreateTypeLoadException(string typeName, string assemblyName)
{
string message = SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, typeName, assemblyName);
return new TypeLoadException(message, typeName);
return new TypeLoadException(message) { TypeName = typeName };
}

// Escape identifiers as described in "Specifying Fully Qualified Type Names" on msdn.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ internal partial struct TypeNameResolver
throw new TypeLoadException(assembly is null ?
SR.Format(SR.TypeLoad_ResolveType, escapedTypeName) :
SR.Format(SR.TypeLoad_ResolveTypeFromAssembly, escapedTypeName, assembly.FullName))
{ TypeNameResolver = escapedTypeName };
{ TypeName = escapedTypeName };
}
return null;
}
Expand Down

0 comments on commit 87cf79d

Please sign in to comment.