diff --git a/trestle/tasks/csv_to_oscal_cd.py b/trestle/tasks/csv_to_oscal_cd.py index c8bf32dff..70b44fa60 100644 --- a/trestle/tasks/csv_to_oscal_cd.py +++ b/trestle/tasks/csv_to_oscal_cd.py @@ -1577,9 +1577,12 @@ def __init__(self, csv_path: pathlib.Path) -> None: """Initialize.""" self._csv = [] with open(csv_path, 'r', newline='') as f: - csv_reader = csv.reader(f, delimiter=',', quoting=csv.QUOTE_MINIMAL) - for row in csv_reader: - self._csv.append(row) + try: + csv_reader = csv.reader(f, delimiter=',', quoting=csv.QUOTE_MINIMAL) + for row in csv_reader: + self._csv.append(row) + except Exception: + raise RuntimeError(f'row: {row}') self._undecorate_header() self._verify() self._csv_rules_map = {}