Skip to content

Commit

Permalink
🥅 Raise exception instead of warn + exit(1)
Browse files Browse the repository at this point in the history
  • Loading branch information
shnizzedy committed Aug 15, 2024
1 parent 494f0c7 commit 64a775b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CPAC/_entrypoints/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,10 +786,9 @@ def run_main():
# fillna
bids_table["ses"] = bids_table["ses"].fillna("None")
grouped_tab = bids_table.groupby(["sub", "ses"])
except Exception as e: # TODO: raise exception
WFLOGGER.warning("Could not create bids table: %s", e)
print("Could not create bids table: %s", e)
sys.exit(1)
except Exception as e:
msg = f"Could not create bids table: {e}"
raise ValueError(msg) from e
# else:
# sub_list = load_cpac_data_config(
# args.data_config_file, args.participant_label, args.aws_input_creds
Expand Down

0 comments on commit 64a775b

Please sign in to comment.