Skip to content

Commit ed41652

Browse files
authored
improve error message when column is not found (#3166)
1 parent 34624f3 commit ed41652

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/other/index.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,13 +386,13 @@ end
386386
candidates = fuzzymatch(l, idx)
387387
if isempty(candidates)
388388
if isempty(l)
389-
throw(ArgumentError("column name :$idx not found in the " *
389+
throw(ArgumentError("column name \"$idx\" not found in the " *
390390
"data frame since it has no columns"))
391391
end
392392
throw(ArgumentError("column name :$idx not found in the data frame"))
393393
end
394-
candidatesstr = join(string.(':', candidates), ", ", " and ")
395-
throw(ArgumentError("column name :$idx not found in the data frame; " *
394+
candidatesstr = join(string.('"', candidates, '"'), ", ", " and ")
395+
throw(ArgumentError("column name \"$idx\" not found in the data frame; " *
396396
"existing most similar names are: $candidatesstr"))
397397
end
398398
return i

0 commit comments

Comments
 (0)