Skip to content

Commit

Permalink
show line number when cannot process a transaction
Browse files Browse the repository at this point in the history
fix #101
  • Loading branch information
splix committed Sep 16, 2023
1 parent b7fcb6b commit a9548b4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/rp2/ods_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,13 @@ def parse_ods(configuration: Configuration, asset: str, input_file_handle: Any)
else:
raise RP2ValueError(f"{asset}({i + 1}): Found data with no header")
elif current_table_type is not None and current_table_row_count > 1:
# Transaction line
_create_and_process_transaction(
configuration, row_values, current_table_type, i + 1, artificial_internal_id, unfiltered_transaction_sets, artificial_transaction_list
)
try:
# Transaction line
_create_and_process_transaction(
configuration, row_values, current_table_type, i + 1, artificial_internal_id, unfiltered_transaction_sets, artificial_transaction_list
)
except RP2Error as exc:
raise RP2ValueError(f"{asset}({i + 1}): {exc}") from exc
current_table_row_count += 1

if current_table_type is not None:
Expand Down

0 comments on commit a9548b4

Please sign in to comment.