-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loaders should return log #291
Comments
We need something, but what you propose doesn't seem useful because we don't know which file has a problem. |
I amended my issue to add the new property WDYT ? |
Is the goal of this to show a helpful message to the user, or to be able to debug what is happening when files are loaded? |
In the specific case of convert-biologic you should add in the loader a try / catch so that it does not crash and for each file add an entry in the log, either 'error' if failed or 'info' if success. |
The converter already throws internally when the file is not supported. For the error that the parser throws I'll catch it and log a warning if that is preferred @lpatiny The other error that I see in most parsers disappears if the crossHairAnnot is commented out. |
It is expected that the converters (parsers) throws and this should not be changed. Those errors (converter throws) should be catch during the loading. We could decide that for now the logs of all the loaders are just 'console.log' but we need to think about a feedback to the user in the future and design a component for this purpose. I'm thinking that adding the property 'error' that contains the error that is catched could also help us to debug in the future what went wrong. You could then display error.stack for advanced users (like us). |
This issue can now be solved using fifo-logger and showing the errors is related to: |
We have currently an issue tracking errors during data loading. This is the case in this project as well as in NMRium.
For each loader we should be able to return information about what they did.
I would suggest that the loader returns a structure like
@stropitek @targos What do you think ?
@jobo322 this is related to your current issue in nmr-load-save.
The text was updated successfully, but these errors were encountered: