Skip to content

removed unused lib, updated docstring for throw exceptions#164

Open
Frederik-Hartmann wants to merge 4 commits into
icometrix:mainfrom
Frederik-Hartmann:loud_error_option
Open

removed unused lib, updated docstring for throw exceptions#164
Frederik-Hartmann wants to merge 4 commits into
icometrix:mainfrom
Frederik-Hartmann:loud_error_option

Conversation

@Frederik-Hartmann

@Frederik-Hartmann Frederik-Hartmann commented Feb 9, 2026

Copy link
Copy Markdown

Hi! I created this PR via VS Code with the wrong title — sorry about that. The correct title should be:

Add option to throw exceptions in convert_dir

This PR relates to: #113 (comment)

Changes

  1. Added an argument throw_exceptions to raise exceptions (the first exception encountered will be raised). Default is False for backwards compatibility.

  2. Replaced traceback.print_exc() with logger.warning(exc, exc_info=True) to maintain error information while logging, as suggested in

    except: # Explicitly capturing all errors here to be able to continue processing all the rest

    • Errors are always logged, even when throw_exceptions=True.

It would be great if you could merge this PR @abrys to allow the use of dicom2nifti in our project. Thanks a lot in advance and thanks for maintaining this open source lib! It is much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant