nextsimhub / nextsimdg

neXtSIM_DG : next generation sea-ice model with DG
https://nextsim-dg.readthedocs.io/en/latest/?badge=latest
Apache License 2.0
10 stars 13 forks source link

Wrap the ncOpen calls to append the file name to the exception message. #481

Closed timspainNERSC closed 5 months ago

timspainNERSC commented 5 months ago

Wrap the ncOpen calls to append the file name to the exception message.

Fixes #480


Really only does what it says in the title.

timspainNERSC commented 5 months ago

Pedantically, I could ask for the catch part to be put into a function to avoid code duplication, but realistically, that would probably require more code and just save two duplicated lines...

I had exactly that thought and came to the same conclusion. Possibly with a frisson more laziness.