You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading a mhd/raw image (probably same with some nifti images) where some metadata is missing in the mhd file, the library just prints the error to the console and swallows it. This is a big problem for applications using the library. Asking the users to check the console is not user friendly. I would like that the errors thrown are bubbled up to the application, so that it can react, for example by:
removing the 'Loading …' message
showing the error to the user in an application specific way.
Suggested correction
In all 4 places where errors are catched and messages are sent to the console, rethrow the error. The places in the code are were the following appears:
window.console.log('oops... something went wrong...');
window.console.log('ooops... :(');
Adding a 'throw error;' is enough in these 4 cases.
How to trigger the error
Load a mhd/raw image where optionnal fields like TransformMatrix or AnatomicalOrientation is missing.
Browsers Affected
All
Versions
AMI: v0.32.0
THREEJS: r105
The text was updated successfully, but these errors were encountered:
Description
When loading a mhd/raw image (probably same with some nifti images) where some metadata is missing in the mhd file, the library just prints the error to the console and swallows it. This is a big problem for applications using the library. Asking the users to check the console is not user friendly. I would like that the errors thrown are bubbled up to the application, so that it can react, for example by:
Suggested correction
In all 4 places where errors are catched and messages are sent to the console, rethrow the error. The places in the code are were the following appears:
Adding a 'throw error;' is enough in these 4 cases.
How to trigger the error
Load a mhd/raw image where optionnal fields like TransformMatrix or AnatomicalOrientation is missing.
Browsers Affected
All
Versions
The text was updated successfully, but these errors were encountered: