Closed kdorheim closed 2 months ago
Swear to God, tryCatch
has the worst documentation page in all of R.
@bpbond I think its incorrect syntax I used to occupy a df with NAs if a run fails for nonviable parameters. Since save_years = NULL
and save_vars = NULL
are function defaults, I gunked it up by trying to print scenario names, years, and variable names, but this becomes problematic when save_years = NULL
and save_vars = NULL
.
At least that's how I am interpreting it. @kdorheim is that correct?
@jk-brown yea I think you are right!
Hi @jk-brown I was trying to use
matilda
for a Hector related EPA project and kept on running into an error that caused theiterate_model
function to break down, the error function implemented within the iterate run tryCatch was also throwing an error due to columns in the data.frame being different lengths.In this PR made a change to the tryCatch statement and then wrote some unit tests to make sure
iterate_model
works as expected and even when don't expect it to work.To recreate the error
Throws the following error message