Better error message upon failure in loading `OpenEphysBinary` folder
Something I've been wanting to do for a long time :)
I think I am clearly not agree with this. This big try except is not good design. We need to put try except on very targeted places that focus on a clear failure that could happen.
Better than before at least. I agree that long term we need a better handling, but I'm not sure when I'll have time for it
I also agree more targeted would be better, but at least what I see from the tracker the usual flow is this.
I have an error with openephysbinary (gives error) That's probably related to folder structure could you list the files.
With this error you tell them that it is likely the folder structure to begin with. Maybe a comment to say in the future improve to more specific/more helpful errors (ie this file was not found--I don't know openephy very well so I'm not sure what the structure would really need to be).
At least lets do the try in the other part:
try:
explore_folder(dirname, experiment_names=None)
except:
...
No ?
At least lets do the try in the other part:
try: explore_folder(dirname, experiment_names=None) except: ...No ?
The second part of the explore_folder already throws an interpretable errror about not finding any structure.oebin files. Only the first part tends to fail with un-interpretable errors