Open tclune opened 3 years ago
It seems pFlogger could not share the error handling with MAPL since it is in baselib and a level higher than MAPL.
Not sure I understand. But taking a guess:
Each project needs to have its own error handling facility. But most of the GFE layers have a flexible facility that allows a higher-level project to specify how to handle errors. This is used for instance to allow unit tests to have a different behavior (continue running) than the regular program (stop). Tools like MAPL can set the behavior by passing in a procedure that will be used.
It is possible that pflogger does not already have this in place, but I suspect it does to facilitate the unit testing. Look to see if there is an "init" passed to the testing framework in the CMakeLists.txt under ./tests.
When a format is bad pflogger crashes with a minimally helpful message. Preferable would be to throw an exception, but since we do not have those in Fortran, we must use the Fortran convention of an optional return code.
The fix is straightforward, but rather tedious to propagate. It may also require analogous changes in gFTL, though RC's there should mostly be in place already.