Skip to content
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

Add return codes to pflogger #44

Open
tclune opened this issue Dec 7, 2020 · 2 comments
Open

Add return codes to pflogger #44

tclune opened this issue Dec 7, 2020 · 2 comments
Assignees

Comments

@tclune
Copy link
Member

tclune commented Dec 7, 2020

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.

@weiyuan-jiang
Copy link
Collaborator

It seems pFlogger could not share the error handling with MAPL since it is in baselib and a level higher than MAPL.

@tclune
Copy link
Member Author

tclune commented Dec 7, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants