NOAA-OWP / ngen

Next Generation Water Modeling Engine and Framework Prototype
Other
84 stars 63 forks source link

atexit() hook to report info about failure conditions #793

Open PhilMiller opened 7 months ago

PhilMiller commented 7 months ago

Current behavior

If a formulation calls exit(), abort(), STOP, or similar, the job just stops, with no clear report of what formulation failed or where.

Expected behavior

The framework should keep track of what formulation is running and what catchment it's running on. An atexit() hook should print the contents of those variables in the event of an unexpected early exit