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

[5pt] Handle system exits with FIM_exit_codes #1214

Closed
mluck opened this issue Jul 10, 2024 · 1 comment · Fixed by #1216
Closed

[5pt] Handle system exits with FIM_exit_codes #1214

mluck opened this issue Jul 10, 2024 · 1 comment · Fixed by #1216
Assignees

Comments

@mluck
Copy link
Contributor

mluck commented Jul 10, 2024

A few scripts in fim_pipeline.sh handle abnormal conditions with sys.exit(), sys.exit(0), or sys.exit(1). These should be handled with FIM_exit_codes in order to prevent hidden downstream pipeline errors caused by missing files, etc. See #1212 for an example.

@RobHanna-NOAA
Copy link
Contributor

Well.. yes, and there are lots of places we do want those errors. Hitting sys.exit (), (0) and (1) are ok if we really want the huc processing to fail that HUC. Other systems pick up the errors for sys.exit(1) and put it in the unit_errors folder. We really only use our special codes so we know how to catch them in key places and log them different (if at all). See examples via filter_catchments_and_add_attributes.py with the search code of FIM_exit_codes.NO_FLOWLINES_EXIST, then in proces_branch.sh and fim_process_unit_wb.sh, it catches status exist codes such as a 61 and decides what to do with them. We can add more codes if we want. Note the best system, but it works.

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

Successfully merging a pull request may close this issue.

2 participants