Skip to content

Commit

Permalink
clarify error message
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomomagni committed Aug 16, 2024
1 parent 495ad80 commit 8642572
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pineko/comparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ def compare(pine, fktable, max_as, max_al, pdf1, xir, xif, pdf2=None):
or fktable.key_values()["convolution_type_2"]
!= pine.key_values()["convolution_type_2"]
):
raise TypeError("Grids and FkTables do not have the same convolution types")
raise ValueError(
f"""Grids and FkTables do not have the same convolution types:
grid=({pine.key_values()['convolution_type_1']},{pine.key_values()['convolution_type_2']})
vs. fk=({fktable.key_values()['convolution_type_1']},{fktable.key_values()['convolution_type_2']})"""
)

# log some useful info to check if PDFs are swapped
rich.print(
Expand Down

0 comments on commit 8642572

Please sign in to comment.