Skip to content

Commit

Permalink
capture original exception before throwing indicator column error
Browse files Browse the repository at this point in the history
  • Loading branch information
sid4py committed Nov 7, 2024
1 parent 883cc44 commit 6eb2a12
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 6eb2a12

Please sign in to comment.