Skip to content

Commit

Permalink
capture exception before raising IndicatorColumnError
Browse files Browse the repository at this point in the history
  • Loading branch information
sid4py authored Nov 7, 2024
1 parent 5fc5345 commit 5e00ef9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neurobooth_terra/redcap.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ def dataframe_to_tuple(df, df_columns, fixed_columns=None,
try:
if col.startswith(indicator_column+'___'):
mapping[col] = col.split('___')[1]
except:
raise IndicatorColumnError('Could not split column: {col} for indicator column: {indicator_column}')
except Exception as e:
raise IndicatorColumnError('Could not split column: {col} for indicator column: {indicator_column}') from e
if len(mapping) == 0:
error_text = f'Please confirm that the combine-checkbox-option-into-single-column' \
'under Redcap survey is unchecked.\n'
Expand Down

0 comments on commit 5e00ef9

Please sign in to comment.