-
Notifications
You must be signed in to change notification settings - Fork 35
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
[Feature]: better error message from run()
#853
Comments
@kellijohnson-NOAA, I'm happy to work on this, but I don't know how to make a 🗑️ executable like you had to replicate the issue. Can you send me something? |
I can work on this with you Ian too. And agreed, a 🗑️ executable would be helpful to reproduce and create the right error. |
Sorry it has taken me so long to reply. I did not create the executable that didn't work for me, instead I downloaded it via |
@kellijohnson-NOAA, thanks for the additional info and no worries on the timeline, especially since you labeled this issue "low priority". I just added a new message in 6f0026b which now causes the output to look like
However, that doesn't work when you have Adding more complex error checking via However, now it is not correctly passing the results to I'm worried that the risk of making things overly complex in order to produce a useful error message for this rare case of a bad executable will cause more common errors to get missed. @kellijohnson-NOAA and @e-gugliotti-NOAA feel free to suggest things I'm not thinking of. |
Maybe the alternative is to put information in the documentation of |
Yes, plus the get_ss3_exe() function tells you which exe it downloaded so if that function downloaded an exe for the wrong OS, the OS that it did download the exe for would be stated in the messages for that function. |
Describe the feature request.
When using
r4ss::run()
where the executable passed to theexe
argument was a non-viable executable, that I obviously did not know was 🗑️, I got a non-intuitive/cryptic error message back fromsystem2()
, not one of the beautiful options documented in the return section of the documentationr4ss/R/run.R
Lines 18 to 20 in 92821e7
Turns out, when a non-viable executable is passed to exe,
system2()
returnsI was confused because of all the tildes in the path. So, I thought maybe I had the path wrong; but, I checked the path multiple times and the file did exist. I just did not know that the executable did not work. So, I was thinking we could write a test that searches through messages captured via try/catch for the tilde and give users our own message that if the file does in fact exist that they should check that it actually works.
Describe alternatives you have considered
Not add anything to r4ss and see if we can get system2 to return a better warning.
Statistical validity, if applicable
No response
Describe if this is needed for a management application
No response
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: