Skip to content

Commit

Permalink
Minor error message improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-C committed Jul 10, 2023
1 parent 63f2d77 commit f3e981a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fpdf/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,12 @@ def render(self):
)
if self.rows:
cols_count = self.rows[0].cols_count
for i, row in enumerate(self.rows[1:], start=1):
for i, row in enumerate(self.rows[1:], start=2):
if row.cols_count != cols_count:
raise FPDFException(
f"Inconsistent column count detected on row {i}"
f"Inconsistent column count detected on row {i}:"
f" it has {row.cols_count} columns,"
f" whereas the top row has {cols_count}."
)
# Defining table global horizontal position:
prev_l_margin = self._fpdf.l_margin
Expand Down

0 comments on commit f3e981a

Please sign in to comment.