add warning on read of out of range Fcast_relF_Basis#346
add warning on read of out of range Fcast_relF_Basis#346Rick-Methot-NOAA merged 3 commits intomainfrom
Conversation
k-doering-NOAA
left a comment
There was a problem hiding this comment.
@Rick-Methot-NOAA I like the warning message, it's very clear! I wonder if a few other changes are necessary:
- Exit on error if Anything other than 1 or 2 is read. Otherwise, I think people will ignore the error
- I still think this statement should be changed to specifically use 1 or 2 instead of 1 and an else statement: #330 (comment) . I think this is more clear, in case a future option is added or if the warning gets deleted for some reason.
Picky/Style: need space between "<1" in the if statement
|
It does exit on error, that is what one of the "1"s does in warn_msg function |
|
message displayed to screen is: message in echoinput is: |
|
Thanks for explaining to me how the write_warning function works, I hadn't used it yet! like the approach of checking inputs early, and it looks good as-is! As for the explicit usage: I see. My concern is that it is confusing for readers of the code to only look for the 1 and then use an |
What issue(s) does this PR address?
(note: including the keyword "resolves" means the issue will be closed automatically when merged in.)
Link issue(s), replacing everything in
[ ]: resolves #[add issue number number], resolves #[optional second issue number if more than 1 issue addressed.]resolves #330
Describe the issue, if not included in the PR
N/A
What tests have been done? Upload any model input files created for testing in a zip file, if possible.
option test; correct warning is created
What tests/review still need to be done? Who can do it, and by when is it needed (ideally)?
none
is there an input change for users to Stock Synthesis?
no
If so, please provide an example of the new inputs needed.
Check which is true. This PR requires:
Describe any changes in r4ss/SS3 manual/SSI that are needed (if not checked):
If changes are needed in the change log, please fill in the table here:
Additional information (optional):