Skip to content

Commit dc64d20

Browse files
committed
better error messaging
1 parent 3305602 commit dc64d20

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/electiondata/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3716,7 +3716,7 @@ def compare_to_results_file(
37163716
)
37173717
if not not_found_in_db.empty:
37183718
nfid_str = (
3719-
f"\nSome expected constests not found. For details, see {sub_dir}"
3719+
f"\nSome expected contests not found. For details, see {sub_dir}"
37203720
)
37213721
err = ui.add_new_error(
37223722
err,
@@ -3925,7 +3925,7 @@ def load_results_df(
39253925
err,
39263926
"jurisdiction",
39273927
juris_true_name,
3928-
f"No contest-selection pairs recognized via munger {munger_name}",
3928+
f"No contest-selection pairs recognized in file {file_name} via munger {munger_name}",
39293929
)
39303930
return err
39313931

src/electiondata/munge/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,8 @@ def add_contest_id(
691691
working, new_err = replace_raw_with_internal_ids(
692692
working,
693693
juris_true_name,
694-
file_name,
695694
munger_name,
695+
file_name,
696696
df_for_type[c_type],
697697
f"{c_type}Contest",
698698
"Name",
@@ -741,7 +741,8 @@ def add_contest_id(
741741
# fail if fatal errors or no contests recognized (in reverse order, just for fun
742742
if working_temp.empty:
743743
err = ui.add_new_error(
744-
err, "jurisdiction", juris_true_name, f"No contests recognized."
744+
err, "jurisdiction", juris_true_name,
745+
f"No contests recognized from file {file_name} with munger {munger_name}."
745746
)
746747
else:
747748
working = working_temp

0 commit comments

Comments
 (0)