MetOffice / monio

Met Office NetCDF I/O (MONIO) written in C++ for file I/O in JEDI-based DA (JADA).
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Standardise Throw Runtime Error #6

Closed phlndrwd closed 1 year ago

phlndrwd commented 1 year ago

Added utility function to standardise the way runtime errors are thrown and logged. It's not essential, but was introduced to help track down the source of a bug, and the decision was made to roll it out to all places that throw runtime errors.

Current test outputs: http://fcm1/cylc-review/taskjobs/punderwo/?suite=monio_throw_exception

mo-joshuacolclough commented 1 year ago

Doesn't make too much difference, but why not use eckit exceptions/macros? E.g ABORT could work well.

phlndrwd commented 1 year ago

Doesn't make too much difference, but why not use eckit exceptions/macros? E.g ABORT could work well.

I'm not a fan of macros 😁 but also I'm being encouraged to reduce the dependencies on external repos. Yash would prefer that we find a way to remove the existing dependencies on oops. It would be a fair amount of work for a low pay-off to do that, and the work would increase if I start introducing new dependencies.