Skip to content

Commit

Permalink
dan's recommended changes
Browse files Browse the repository at this point in the history
  • Loading branch information
avi-berkowitz-zocdoc committed Dec 28, 2017
1 parent 9379753 commit 474b0d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/Models/Table.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ public void ImportData(string conn, string filename) {
var row = dt.NewRow();
var fields = (new String(line.ToArray())).Split(new[] { fieldSeparator }, StringSplitOptions.None);
if (fields.Length != dt.Columns.Count) {
var columnNames = dt.Columns.OfType<DataColumn>().Select(c => $"({c.ColumnName} ({c.DataType})").ToArray();
var details = $"fields.Length: {fields.Length}, Columns.Count: {dt.Columns.Count}, Column Names: {string.Join(",", columnNames)}";
var columnNames = dt.Columns.OfType<DataColumn>().Select(c => $" * {c.ColumnName} ({c.DataType})").ToArray();
var details = $"fields.Length: {fields.Length}, Columns.Count: {dt.Columns.Count}, Column Names:{Environment.NewLine}{string.Join(Environment.NewLine, columnNames)}";
throw new DataFileException($"Incorrect number of columns, {details}", filename, linenumber);
}
for (var j = 0; j < fields.Length; j++) {
Expand Down

0 comments on commit 474b0d9

Please sign in to comment.