Closed
Description
This message probably meant to have the parameter name in the string.
"System.ArgumentOutOfRangeException: is missing ColumnAttribute
Parameter name: Name
at Microsoft.ML.TextLoader`1.SetCustomStringFromType(Boolean useHeader, String separator, Boolean allowQuotedStrings, Boolean supportSparse, Boolean trimWhitespace)
at Microsoft.ML.TextLoader`1..ctor(String inputFilePath, Boolean useHeader, String separator, Boolean allowQuotedStrings, Boolean supportSparse, Boolean trimWhitespace)
at Microsoft.ML.NYCTaxiFare.Program.Train() in C:\Users\danmose\source\repos\ConsoleApp81\ConsoleApp81\Program.cs:line 25
at Microsoft.ML.NYCTaxiFare.Program.Main(String[] args) in C:\Users\danmose\source\repos\ConsoleApp81\ConsoleApp81\Program.cs:line 17"
It's because it's thrown like
throw Contracts.ExceptParam(nameof(field.Name), " is missing ColumnAttribute");
and the ExceptParam does not prefix it for free:
306: public static Exception ExceptParam(string paramName, string msg)
307 => Process(new ArgumentOutOfRangeException(paramName, msg));