Skip to content

Commit 5ab9604

Browse files
authored
clearer error and suggestion when c-analyzer cannot read ignored.tsv (python#129423)
1 parent a810cb8 commit 5ab9604

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tools/c-analyzer/c_analyzer/datafiles.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ def _iter_ignored(infile, relroot):
104104
for v in varidinfo)
105105
if reason in bogus:
106106
reason = None
107-
varid = _info.DeclID.from_row(varidinfo)
107+
try:
108+
varid = _info.DeclID.from_row(varidinfo)
109+
except BaseException as e:
110+
e.add_note(f"Error occurred when processing row {varidinfo} in {infile}.")
111+
e.add_note(f"Could it be that you added a row which is not tab-delimited?")
112+
raise e
108113
varid = varid.fix_filename(relroot, formatted=False, fixroot=False)
109114
yield varid, reason
110115

0 commit comments

Comments
 (0)