Skip to content

Commit

Permalink
Merge pull request #542 from oesteban/enh/463
Browse files Browse the repository at this point in the history
[ENH] Better error message when --participant_label is set
  • Loading branch information
oesteban committed Jun 2, 2017
2 parents ea8e7ab + 7e47f61 commit c90e9c6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mriqc/bin/mriqc_run.py
Expand Up @@ -314,8 +314,14 @@ def main():
from nipype.utils.draw_gantt_chart import generate_gantt_chart
generate_gantt_chart(callback_log_path, cores=settings['n_procs'])
else:
raise RuntimeError('Error reading BIDS directory (%s), or the dataset is not '
'BIDS-compliant.' % settings['bids_dir'])
msg = """\
Error reading BIDS directory ({}), or the dataset is not \
BIDS-compliant."""
if opts.participant_label is not None:
msg = """\
None of the supplied labels (--participant_label) matched with the \
participants found in the BIDS directory ({})."""
raise RuntimeError(msg.format(settings['bids_dir']))

MRIQC_LOG.info('Participant level finished successfully.')

Expand Down

0 comments on commit c90e9c6

Please sign in to comment.