Skip to content

Conversation

@HenkMutsaerts
Copy link
Member

Linked issue

Closes #808

@HenkMutsaerts HenkMutsaerts linked an issue Aug 31, 2021 that may be closed by this pull request
Copy link
Contributor

@jan-petr jan-petr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@MichaelStritt MichaelStritt added the bug Something isn't working label Sep 1, 2021
@MichaelStritt
Copy link
Contributor

Played around with the code a tiny bit. I tried to make it similar to the one from ImportMaster:

...
================================== NIFTI to BIDS CONVERSION ==================================
================================== dataset_description.json ==================================
Missing recommended fields:           HEDVersion, DatasetType, License


==============================================================================================
NII2BIDS failed for anatomical image of Sub103_run-1
Message: This is a test error...
xASL_imp_NII2BIDS_RunAnat, line 26...
Continuing...
================================== BIDS JSON Check Results ===================================
Missing recommended ASL fields:       SliceEncodingDirection, LabelingOrientation
...

It is also included in the x.logging field now, just like in the ImportMaster:

>> x.logging
ans = 
  struct with fields:
    message: 'This is a test error...'
      stack: [9×1 struct]

>> x.logging.stack(1)
ans = 
  struct with fields:
    file: '...\m.stritt\Server_xASL\ExploreASL\Modules\SubModule_Import\xASL_imp_NII2BIDS_RunAnat.m'
    name: 'xASL_imp_NII2BIDS_RunAnat'
    line: 26

>> x.logging.stack(2)
ans = 
  struct with fields:
    file: '...\m.stritt\Server_xASL\ExploreASL\Modules\SubModule_Import\xASL_imp_NII2BIDS_Run.m'
    name: 'xASL_imp_NII2BIDS_Run'
    line: 35

Copy link
Contributor

@MichaelStritt MichaelStritt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay for me, maybe @jan-petr needs to recheck my edits though 👍

HenkMutsaerts and others added 4 commits September 1, 2021 16:35
I think for the part after Run we should use camelcase as well. Otherwise this seems like a good addition. I am checking out if we can add this to the logging struct in some kind of way.
@MichaelStritt MichaelStritt force-pushed the bug-#808_CatchErrorsInImport branch from 61ab342 to 003a9b3 Compare September 1, 2021 14:35
@MichaelStritt MichaelStritt merged commit 003a9b3 into release-1.8.0 Sep 1, 2021
@MichaelStritt MichaelStritt deleted the bug-#808_CatchErrorsInImport branch September 1, 2021 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import issues error instead of warning

4 participants